修正A股涨跌停严格触价规则

This commit is contained in:
boris
2026-06-15 18:50:10 +08:00
parent 5181d0e403
commit 5d2bcd8366
2 changed files with 23 additions and 3 deletions
+2 -2
View File
@@ -159,14 +159,14 @@ impl DailyMarketSnapshot {
if !self.upper_limit.is_finite() || self.upper_limit <= 0.0 {
return false;
}
price >= self.upper_limit - self.effective_price_tick() + 1e-6
price >= self.upper_limit - 1e-9
}
pub fn is_at_lower_limit_price(&self, price: f64) -> bool {
if !self.lower_limit.is_finite() || self.lower_limit <= 0.0 {
return false;
}
price <= self.lower_limit + self.effective_price_tick() - 1e-6
price <= self.lower_limit + 1e-9
}
}