Polish risk sizing: 2dp money preview, editable ratio/exit, plan badge.
Exit unit and perp/option units scale with k; plan page shows 以损定仓. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -151,7 +151,9 @@ export default function PlanPage() {
|
||||
const exitRuleLabel =
|
||||
exitMode === "premium_multiple"
|
||||
? `权利金×${fmt(plan?.premium_exit_multiple ?? 1, 2)}`
|
||||
: `固定 ${fmt(plan?.net_profit_target ?? 15)} U`;
|
||||
: plan?.risk_based || plan?.sizing_mode === "risk_based"
|
||||
? `以损定仓 · 固定 ${fmt(exitTarget)} U(基数${fmt(plan?.risk_exit_unit ?? 15)})`
|
||||
: `固定 ${fmt(plan?.net_profit_target ?? 15)} U`;
|
||||
const phaseLabel = PHASE_ZH[plan?.phase || ""] || plan?.phase || "—";
|
||||
const atmRule = plan?.fixed_direction_enabled
|
||||
? plan?.fixed_perp_side === "short"
|
||||
@@ -343,8 +345,20 @@ export default function PlanPage() {
|
||||
<div className="kv">
|
||||
<span>选约条件</span>
|
||||
<span className="mono">
|
||||
永续{fmt(plan?.perp_qty_eth ?? 1, 0)}ETH/期权
|
||||
{fmt(plan?.option_qty_eth ?? 2, 0)}ETH · 剩余≥
|
||||
{plan?.risk_based || plan?.sizing_mode === "risk_based" ? (
|
||||
<>
|
||||
<span className="status-running">以损定仓</span>
|
||||
{" · "}
|
||||
比例{fmt(plan?.risk_perp_unit ?? 1, 2)}:
|
||||
{fmt(plan?.risk_option_unit ?? 2, 2)}
|
||||
{plan?.risk_last_k
|
||||
? ` · k=${fmt(plan.risk_last_k, 1)}`
|
||||
: ""}
|
||||
{" · "}
|
||||
</>
|
||||
) : null}
|
||||
永续{fmt(plan?.perp_qty_eth ?? 1, 2)}ETH/期权
|
||||
{fmt(plan?.option_qty_eth ?? 2, 2)}ETH · 剩余≥
|
||||
{fmt(plan?.min_option_hours, 0)}h · 期权杠杆≥
|
||||
{fmt(plan?.min_option_leverage, 0)}x
|
||||
{plan?.fixed_direction_enabled
|
||||
|
||||
Reference in New Issue
Block a user