Allow jq sells when snapshot last stays above limit

This commit is contained in:
boris
2026-04-21 18:59:48 -07:00
parent 20af824545
commit 6c353d5441
3 changed files with 42 additions and 2 deletions

View File

@@ -53,7 +53,11 @@ impl ChinaEquityRuleHooks {
}
fn at_lower_limit(snapshot: &DailyMarketSnapshot, price_field: PriceField) -> bool {
snapshot.is_at_lower_limit_price(snapshot.sell_price(price_field))
let check_price = match price_field {
PriceField::Last => snapshot.price(PriceField::Last),
_ => snapshot.sell_price(price_field),
};
snapshot.is_at_lower_limit_price(check_price)
}
}