修正执行价quote多时间加载

This commit is contained in:
boris
2026-06-16 00:05:34 +08:00
parent c2de9d8e83
commit ff145300b4
3 changed files with 259 additions and 7 deletions
+5 -3
View File
@@ -362,8 +362,7 @@ where
symbol: &str,
snapshot: &crate::data::DailyMarketSnapshot,
) -> f64 {
if self.aiquant_rqalpha_execution_rules && self.execution_price_field == PriceField::Last
{
if self.aiquant_rqalpha_execution_rules && self.execution_price_field == PriceField::Last {
let start_cursor = self
.runtime_intraday_start_time
.get()
@@ -5395,7 +5394,10 @@ mod tests {
)
.expect("process target value");
assert_eq!(portfolio.position(symbol).map(|pos| pos.quantity), Some(21_400));
assert_eq!(
portfolio.position(symbol).map(|pos| pos.quantity),
Some(21_400)
);
let order = report.order_events.last().expect("target value order");
assert_eq!(order.requested_quantity, 200);
assert_eq!(order.filled_quantity, 200);