修复日内时钟提前记账并按原订单续执行算法单

This commit is contained in:
boris
2026-09-14 03:52:52 +08:00
parent 3a3091a2cf
commit 237ee15a51
8 changed files with 2001 additions and 346 deletions
+2
View File
@@ -102,6 +102,7 @@ pub struct OpenOrderView {
pub avg_price: f64,
pub transaction_cost: f64,
pub limit_price: f64,
pub reserved_cash: Option<f64>,
pub reason: String,
}
@@ -497,6 +498,7 @@ impl StrategyContext<'_> {
.iter()
.filter(|order| order.side == OrderSide::Buy)
.map(|order| {
if let Some(reserved) = order.reserved_cash { return reserved; }
let price = if order.limit_price.is_finite() {
order.limit_price.max(0.0)
} else {