修复股票池卖单回报后未继续执行买入阶段

This commit is contained in:
boris
2026-09-13 23:43:26 +08:00
parent 53af3a6a85
commit c98bcc3eb2
5 changed files with 844 additions and 18 deletions
+6 -1
View File
@@ -2862,12 +2862,13 @@ where
)?;
if should_run_minute_events(&intraday_schedule_rules, &self.subscriptions)
|| (self.broker.has_open_orders() && self.broker.drives_resting_quote_clock())
|| ((self.broker.has_open_orders() || self.broker.has_pending_stock_pool_execution()) && self.broker.drives_resting_quote_clock())
{
let unfiltered_minute_stream = self.subscriptions.is_empty();
let mut full_minute_symbols = self.subscriptions.clone();
if self.broker.drives_resting_quote_clock() {
full_minute_symbols.extend(self.broker.open_order_views().into_iter().map(|order| order.symbol));
full_minute_symbols.extend(self.broker.pending_stock_pool_symbols());
}
if self.execution_quote_loader.is_some() && !full_minute_symbols.is_empty() {
let mut minute_symbols = full_minute_symbols.clone();
@@ -2954,6 +2955,7 @@ where
&& !has_minute_process_listeners
&& !schedule_candidate
&& !self.has_open_orders()
&& !self.broker.has_pending_stock_pool_execution()
{
continue;
}
@@ -3135,6 +3137,7 @@ where
// clock strictly after the event already processed.
let mut newly_pending = self.broker.open_order_views().into_iter()
.map(|order| order.symbol)
.chain(self.broker.pending_stock_pool_symbols())
.filter(|symbol| !full_minute_symbols.contains(symbol))
.collect::<BTreeSet<_>>();
if !newly_pending.is_empty() && self.broker.drives_resting_quote_clock() {
@@ -3158,6 +3161,8 @@ where
self.data.release_execution_quotes_on_date(execution_date);
}
self.broker.finish_stock_pool_session(execution_date, &mut report);
portfolio.update_prices_with_options(
execution_date,
&self.data,