Added trace corID to first quote udpate call (after getting the first ack)
This commit is contained in:
1 parent
96c7cc1528
commit
18d3c268de
3 files changed
+14
-2
No files matched your search
@@ -22,6 +22,7 @@ _filled_quantity(src._filled_quantity),
|
||||
_last_filled_price(src._last_filled_price),
|
||||
_last_reported_order_price(src._last_reported_order_price),
|
||||
_last_filled_quantity(src._last_filled_quantity),
|
||||
_last_update_trace(src._last_update_trace),
|
||||
_out_price(src._out_price),
|
||||
_out_quantity(src._out_quantity),
|
||||
_order_place_time(src._order_place_time)
|
||||
@@ -54,6 +55,7 @@ void SpreaderChildOrderState::re_init (ChildOrder& child_order){
|
||||
_last_filled_price = Price(0);
|
||||
_last_reported_order_price=Price(0);
|
||||
_last_filled_quantity = Quantity(0);
|
||||
_last_update_trace=trace::CorID();
|
||||
_out_price = Price(0);
|
||||
_out_quantity = Quantity(0);
|
||||
_order_place_time=bts::TimeStamp();
|
||||
|
||||
@@ -44,6 +44,9 @@ private:
|
||||
Price _last_filled_price;
|
||||
Price _last_reported_order_price;
|
||||
Quantity _last_filled_quantity;
|
||||
// this is the trace of the order event
|
||||
// from the last on_order_update call
|
||||
trace::CorID _last_update_trace;
|
||||
// this is latest price, qty sent out
|
||||
Price _out_price;
|
||||
Quantity _out_quantity;
|
||||
@@ -113,6 +116,9 @@ public:
|
||||
bts::TimeStamp order_place_time() const{
|
||||
return _order_place_time;
|
||||
}
|
||||
const trace::CorID& last_update_trace() const{
|
||||
return _last_update_trace;
|
||||
}
|
||||
// init ///////////////////
|
||||
///////////////////////////
|
||||
// this assignes a new order, and subsumes the earlier order's
|
||||
@@ -134,6 +140,7 @@ public:
|
||||
- _filled_quantity.value());
|
||||
_last_filled_price = Price(e.last_price);
|
||||
_last_reported_order_price=Price(e.price);
|
||||
_last_update_trace=e.trace;
|
||||
SpreaderUtils::compute_average_price(_filled_price,
|
||||
_filled_quantity,
|
||||
_last_filled_price,
|
||||
|
||||
+5
-2
@@ -17,7 +17,9 @@ void QuoterWorkingStateWorker::on_transition (){
|
||||
// waiting for the ack, things could have changed (namely
|
||||
// fills in other legs, books, order qty change), hence
|
||||
// we analyze and potentially modify/cxl immediatly
|
||||
_longpath_analyze_and_act ();
|
||||
trace::CorID ack_message_trace_id=
|
||||
_quoter->_child_order_state.last_update_trace();
|
||||
_longpath_analyze_and_act (ack_message_trace_id);
|
||||
}
|
||||
void QuoterWorkingStateWorker::one_time_activate (Price,
|
||||
Quantity){
|
||||
@@ -25,10 +27,11 @@ void QuoterWorkingStateWorker::one_time_activate (Price,
|
||||
}
|
||||
void QuoterWorkingStateWorker::on_order_update (const SpreaderChildOrderState& u){
|
||||
bts_assert (u.acknowledged());
|
||||
trace::CorID ack_message_trace_id=u.last_update_trace();
|
||||
if (u.terminal_status())
|
||||
_quoter->_transform_to_END ();
|
||||
else
|
||||
_longpath_analyze_and_act ();
|
||||
_longpath_analyze_and_act (ack_message_trace_id);
|
||||
}
|
||||
void QuoterWorkingStateWorker::on_book (size_t,
|
||||
const bts::orderman::Book&,
|
||||
|
||||
Reference in new issue
Block a user