From ec098c6d3978f53848cdfe3133ad95b76b3018f0 Mon Sep 17 00:00:00 2001 From: boris Date: Wed, 8 Jul 2026 02:12:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E5=90=8C=E8=BD=AE=E8=A1=A5?= =?UTF-8?q?=E4=BB=93=E9=87=8D=E5=A4=8D=E9=87=8A=E6=94=BE=E6=A7=BD=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/fidc-core/src/platform_expr_strategy.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 {