From a91c2d9bc6f28be4636c9d31a0d30c5ce205e684 Mon Sep 17 00:00:00 2001 From: Taha Afzal Date: Tue, 16 Jul 2019 11:20:15 -0400 Subject: [PATCH] SP-146 (Limiter will not accept unresolved fills) --- src/server/sparkd/position/PositionServiceServer.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/server/sparkd/position/PositionServiceServer.cpp b/src/server/sparkd/position/PositionServiceServer.cpp index f73a0178f..7c3fdf022 100644 --- a/src/server/sparkd/position/PositionServiceServer.cpp +++ b/src/server/sparkd/position/PositionServiceServer.cpp @@ -84,16 +84,12 @@ me(new PImpl(context, rxcpp::operators::subscribe( [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();