Anchor semi exit to strike +/- move points; side-by-side semi cards.

Forward target is K+/-N not spot+/-N; UI shows option target and perp net lock.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-08 14:59:48 +08:00
parent 6f983ed2ab
commit 4f56eff40c
8 changed files with 162 additions and 70 deletions
+8 -3
View File
@@ -978,9 +978,9 @@ class StrategyEngine:
rk = 1.0
semi_d = check_semi_exits(
net_pnl=float(upl.get("net_pnl") or 0),
entry_index=(
float(upl["entry_index_px"])
if upl.get("entry_index_px") is not None
strike=(
float(upl["strike"])
if upl.get("strike") is not None
else None
),
index_px=(
@@ -992,6 +992,11 @@ class StrategyEngine:
option_move_points=float(sp["option_move_points"]),
perp_exit_unit=float(sp["perp_exit_unit"]),
risk_k=rk,
entry_index=(
float(upl["entry_index_px"])
if upl.get("entry_index_px") is not None
else None
),
)
# 复用 ExitDecision 形态
from .exits import ExitDecision