SP-146 (Limiter will not accept unresolved fills)
This commit is contained in:
1 parent
c9c93b3cf0
commit
a91c2d9bc6
1 file changed
+4
-8
@@ -84,16 +84,12 @@ me(new PImpl(context,
|
||||
rxcpp::operators::subscribe<api::orderman::FillsUpdate>(
|
||||
[this](auto const& update) {
|
||||
for (const auto& f : update.removed())
|
||||
if(_valid_account_id(*f))
|
||||
me->publisher.add_or_update(_on_fill(*f,false));
|
||||
me->publisher.add_or_update(_on_fill(*f,false));
|
||||
for (const auto& f : update.added())
|
||||
if(_valid_account_id(*f))
|
||||
me->publisher.add_or_update(_on_fill(*f,true));
|
||||
me->publisher.add_or_update(_on_fill(*f,true));
|
||||
for (const auto& f : update.changed()) {
|
||||
if(_valid_account_id(*f.previous()) && _valid_account_id(*f.current())){
|
||||
me->publisher.add_or_update(_on_fill(*f.previous(),false));
|
||||
me->publisher.add_or_update(_on_fill(*f.current(),true));
|
||||
}
|
||||
me->publisher.add_or_update(_on_fill(*f.previous(),false));
|
||||
me->publisher.add_or_update(_on_fill(*f.current(),true));
|
||||
}
|
||||
me->publisher.flush();
|
||||
_compute_pnl_and_publish();
|
||||
|
||||
Reference in new issue
Block a user