修复allow_sell执行风控开关

This commit is contained in:
boris
2026-07-04 03:31:30 +08:00
parent 3a66c90f34
commit 69576f7e5b
2 changed files with 66 additions and 5 deletions
+4 -1
View File
@@ -2295,7 +2295,10 @@ where
position: &crate::portfolio::Position,
algo_request: Option<&AlgoExecutionRequest>,
) -> RuleCheck {
if !self.aiquant_execution_rules && !candidate.allow_sell {
if self.risk_config.static_rules.respect_allow_buy_sell
&& !self.aiquant_execution_rules
&& !candidate.allow_sell
{
return RuleCheck::reject("sell_disabled");
}
let check_price = if self.aiquant_execution_rules {