Fix option-option exit preview to use budget times reward ratio.

Plan no longer shows perp exit_unit*k as the OO target.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-07 16:41:51 +08:00
parent eaf94448a2
commit 24943adf13
3 changed files with 136 additions and 2 deletions
+4 -1
View File
@@ -208,9 +208,12 @@ export default function PlanPage() {
const netPnl = pos?.net_pnl ?? 0;
const movePct = pos?.move_pct ?? 0;
const ooRatio = Number(plan?.oo_reward_ratio ?? 2);
const ooBudget = plan?.risk_sizing_preview?.budget;
const exitRuleLabel = isOo
? exitTarget != null
? `${riskLocked ? "锁定 " : ""}净盈≥${fmt(exitTarget)} U预算×${fmt(ooRatio, 1)}`
? `${riskLocked ? "锁定 " : ""}净盈≥${fmt(exitTarget)} U${
ooBudget != null ? `${fmt(ooBudget)}×` : "预算×"
}${fmt(ooRatio, 1)}`
: `净盈≥预算×${fmt(ooRatio, 1)}(达标只平盈利腿)`
: exitMode === "premium_multiple"
? `权利金×${fmt(plan?.premium_exit_multiple ?? 1, 2)}`