strategy: implement model assist be-lock path and clarify audit note
This commit is contained in:
@@ -85,6 +85,8 @@ def evaluate_exit(
|
||||
reason = "atr_trailing_stop"
|
||||
elif be_lock_threat:
|
||||
reason = "be_lock_threat"
|
||||
elif model_exit_signal and next_state == PositionState.BE_LOCK:
|
||||
reason = "model_assist_be_lock"
|
||||
elif take_profit_hit:
|
||||
# Backward-compatible immediate profit-taking path.
|
||||
reason = "arm_take_profit"
|
||||
|
||||
@@ -62,5 +62,8 @@ def promote_state(current: PositionState, inp: StateTransitionInput) -> Position
|
||||
target = PositionState.ARMED
|
||||
elif inp.unrealized_pnl_pct >= inp.be_arm_pct:
|
||||
target = PositionState.BE_LOCK
|
||||
elif inp.model_exit_signal:
|
||||
# Model signal assists risk posture by tightening to BE_LOCK.
|
||||
target = PositionState.BE_LOCK
|
||||
|
||||
return target if _STATE_RANK[target] > _STATE_RANK[current] else current
|
||||
|
||||
Reference in New Issue
Block a user