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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user