remove pnl rows from which there is no net pos or day pos
This commit is contained in:
1 parent
95939a5534
commit
95e96a6afc
1 file changed
+4
@@ -42,6 +42,10 @@ namespace mbts.spark {
|
||||
if (p != null) {
|
||||
PnLCalculator calc = new PnLCalculator(p.state.Values, _selected_pnl_calc_type.Value);
|
||||
var summary_position_rows = calc.get_summary_position();
|
||||
// remove rows for which there is no net pos or no day pos
|
||||
summary_position_rows = summary_position_rows.Where(r =>
|
||||
!(r.start_net_position == 0 && r.day_long_quantity == 0 && r.day_short_quantity == 0)
|
||||
);
|
||||
_pnl_data.sync_with(summary_position_rows);
|
||||
_last_pnl_update_time = DateTime.Now;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user