Add 永期半自动: human arm, machine open/close, then stop.
Settings toggle, Plan panel, Fleet monitor, exit locks and armed TOCTOU gates; docs and dual audits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -721,10 +721,22 @@ class StrategySession:
|
||||
|
||||
def _pick_for_open_perp(self) -> OpenPick | None:
|
||||
from .signal import decide, decide_fixed
|
||||
from .semi_auto import is_armed, is_semi_auto, read_semi_params
|
||||
|
||||
s = self.settings
|
||||
min_hours, min_lev, max_atm_off, atm_off_on = _strategy_floats()
|
||||
fixed_on, fixed_perp = _fixed_direction()
|
||||
# 半自动:强制看法方向 + 实值/平值 + 半自动选约门槛(须已授权)
|
||||
semi_on = is_semi_auto()
|
||||
if semi_on:
|
||||
if not is_armed():
|
||||
return None
|
||||
sp = read_semi_params()
|
||||
fixed_on = True
|
||||
fixed_perp = str(sp["perp_side"])
|
||||
min_hours = float(sp["min_option_hours"])
|
||||
min_lev = float(sp["min_option_leverage"])
|
||||
atm_off_on = False
|
||||
opt_side_hint = _option_side_for_perp(fixed_perp) if fixed_on else None
|
||||
# 第一关:振幅过滤(默认关;开启则回看窗振幅须 ≤ 最大%)
|
||||
if not self._apply_amplitude_first_gate():
|
||||
|
||||
Reference in New Issue
Block a user