Show strategy rules in fold; larger nav; notify only when cannot open.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -149,6 +149,13 @@ export default function PlanPage() {
|
||||
? `权利金×${fmt(plan?.premium_exit_multiple ?? 1, 2)}`
|
||||
: `固定 ${fmt(plan?.net_profit_target ?? 15)} U`;
|
||||
const phaseLabel = PHASE_ZH[plan?.phase || ""] || plan?.phase || "—";
|
||||
const atmRule = plan?.atm_open_offset_enabled
|
||||
? `ATM偏差≤${fmt(plan?.max_atm_open_offset ?? 3, 0)}`
|
||||
: "ATM偏差关";
|
||||
const exitDetail =
|
||||
exitMode === "premium_multiple"
|
||||
? `净盈利≥初始权利金×${fmt(plan?.premium_exit_multiple ?? 1, 2)}`
|
||||
: `净盈利≥${fmt(plan?.net_profit_target ?? 15)} U`;
|
||||
const expiryMs =
|
||||
pos?.expiry_ms ?? expiryMsFromYmd(pos?.expiry_ymd) ?? null;
|
||||
const countdown =
|
||||
@@ -213,10 +220,28 @@ export default function PlanPage() {
|
||||
<div className="plan-rules-fold">
|
||||
<details>
|
||||
<summary>规则说明</summary>
|
||||
<p className="meta plan-rules-body">
|
||||
行情 {String(plan?.exchange || "okx").toUpperCase()} · ETH-USDT-SWAP ·
|
||||
目标平仓(双腿/远虚只平永续) · 未达标则到期结算
|
||||
</p>
|
||||
<div className="plan-rules-body">
|
||||
<p>
|
||||
<span className="plan-rules-k">行情</span>
|
||||
{String(plan?.exchange || "okx").toUpperCase()} · ETH-USDT-SWAP
|
||||
</p>
|
||||
<p>
|
||||
<span className="plan-rules-k">开仓</span>
|
||||
永续 {fmt(plan?.perp_qty_eth ?? 1, 2)} ETH / {fmt(plan?.leverage, 0)}x
|
||||
· 期权 {fmt(plan?.option_qty_eth ?? 2, 2)} ETH 名义 · 剩余≥
|
||||
{fmt(plan?.min_option_hours, 0)}h · 期权杠杆≥
|
||||
{fmt(plan?.min_option_leverage, 0)}x · {atmRule}
|
||||
{plan?.skip_weekends ? " · 周末跳过开仓" : ""}
|
||||
</p>
|
||||
<p>
|
||||
<span className="plan-rules-k">平仓</span>
|
||||
{exitDetail} → 双腿全平;期权远虚则只平永续、期权到期结算;未达标拖到期
|
||||
</p>
|
||||
<p>
|
||||
<span className="plan-rules-k">节奏</span>
|
||||
组间休息 {plan?.rest_seconds ?? "—"}s · 可开判定看交易账户
|
||||
</p>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user