added send order and cancel
This commit is contained in:
1 parent
851459922f
commit
8d600e090f
2 files changed
+9
-1
No files matched your search
@@ -190,6 +190,10 @@ void QueueHolderOrder::_send_initial_orders(){
|
||||
order.order.activate(Price(price),Quantity(me->state.quantity()));
|
||||
}
|
||||
}
|
||||
void QueueHolderOrder::_cancel_orders(){
|
||||
for(auto& sub_ord : me->orders)
|
||||
sub_ord.order.cancel();
|
||||
}
|
||||
void QueueHolderOrder::_report_state() {
|
||||
}
|
||||
void QueueHolderOrder::_switch_state(State) {
|
||||
|
||||
@@ -25,6 +25,9 @@ enum State{
|
||||
// this state until it gets an ack on all
|
||||
// the queue orders
|
||||
WAITING_FOR_FIRST_ACK=1,
|
||||
// before all orders are acked,
|
||||
// the order is cancelled
|
||||
//WAITING_FOR_FIRST_ACK_CANCELLED=2,
|
||||
// all orders are ack'ed, free to accept
|
||||
// updates
|
||||
WORKING=3,
|
||||
@@ -58,7 +61,8 @@ private:
|
||||
bool _on_init_new(const api::orderman::OrderDefinition& order_def,
|
||||
const PreActivationOrderServices& pre_os);
|
||||
// sends orders for the first time
|
||||
void _send_initial_orders();
|
||||
void _send_initial_orders();
|
||||
void _cancel_orders();
|
||||
void _report_state();
|
||||
void _switch_state(State new_state);
|
||||
bool _activated() const;
|
||||
|
||||
Reference in new issue
Block a user