diff --git a/crates/fidc-core/src/platform_expr_strategy.rs b/crates/fidc-core/src/platform_expr_strategy.rs index 53d3ab9..7f5c784 100644 --- a/crates/fidc-core/src/platform_expr_strategy.rs +++ b/crates/fidc-core/src/platform_expr_strategy.rs @@ -8125,7 +8125,6 @@ impl Strategy for PlatformExprStrategy { let mut intraday_attempted_buys = BTreeSet::::new(); let mut same_bar_buy_symbols = BTreeSet::::new(); let mut delayed_sold_symbols = BTreeSet::::new(); - let mut delayed_exit_slot_blocking_symbols = BTreeSet::::new(); let mut unresolved_stop_loss_symbols = BTreeSet::::new(); let mut pending_risk_level_forced_exit_symbols = BTreeSet::::new(); let delayed_limit_exit_time = self @@ -8229,7 +8228,6 @@ impl Strategy for PlatformExprStrategy { end_time: Some(delayed_limit_exit_time), reason: "delayed_limit_open_sell".to_string(), }); - delayed_exit_slot_blocking_symbols.insert(symbol.clone()); self.forget_position_entry_date(&symbol); let projected_sold = if ctx .data @@ -8334,7 +8332,7 @@ impl Strategy for PlatformExprStrategy { let daily_top_up_target_budget = aiquant_total_value * trading_ratio; let mut daily_top_up_pending_buy_value = 0.0_f64; let mut pending_full_close_symbols = BTreeSet::::new(); - let mut slot_blocking_symbols = delayed_exit_slot_blocking_symbols.clone(); + let mut slot_blocking_symbols = BTreeSet::::new(); let mut interleaved_pending_full_close_symbols = BTreeSet::::new(); let risk_level_forced_exit_time = self.risk_level_forced_exit_time(); self.pending_full_close_symbols.retain(|symbol| { @@ -8667,6 +8665,9 @@ impl Strategy for PlatformExprStrategy { target_value: 0.0, reason: "pending_full_close_exit".to_string(), }); + if daily_top_up_pending_buy_value > 0.0 { + slot_blocking_symbols.insert(position.symbol.clone()); + } self.forget_position_entry_date(&position.symbol); let can_sell = defer_execution_risk || self.can_sell_position(ctx, execution_date, &position.symbol); @@ -8757,6 +8758,9 @@ impl Strategy for PlatformExprStrategy { target_value: 0.0, reason: "stop_loss_exit".to_string(), }); + if daily_top_up_pending_buy_value > 0.0 { + slot_blocking_symbols.insert(position.symbol.clone()); + } self.forget_position_entry_date(&position.symbol); slot_working_symbols.remove(&position.symbol); if can_sell { @@ -8825,6 +8829,9 @@ impl Strategy for PlatformExprStrategy { target_value: 0.0, reason: "take_profit_exit".to_string(), }); + if daily_top_up_pending_buy_value > 0.0 { + slot_blocking_symbols.insert(position.symbol.clone()); + } self.forget_position_entry_date(&position.symbol); slot_working_symbols.remove(&position.symbol); if can_sell {