Add ATM open-offset toggle default off.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -197,8 +197,10 @@ export default function PlanPage() {
|
||||
<span>选约条件</span>
|
||||
<span className="mono">
|
||||
剩余≥{fmt(plan?.min_option_hours, 0)}h · 期权杠杆≥
|
||||
{fmt(plan?.min_option_leverage, 0)}x · ATM偏差≤
|
||||
{fmt(plan?.max_atm_open_offset ?? 3, 0)}
|
||||
{fmt(plan?.min_option_leverage, 0)}x
|
||||
{plan?.atm_open_offset_enabled
|
||||
? ` · ATM偏差≤${fmt(plan?.max_atm_open_offset ?? 3, 0)}`
|
||||
: " · ATM偏差关"}
|
||||
</span>
|
||||
</div>
|
||||
<div className="kv">
|
||||
@@ -418,9 +420,13 @@ export default function PlanPage() {
|
||||
if (strike == null || px == null) return "—";
|
||||
const abs = Math.abs(strike - px);
|
||||
const sign = strike - px > 0 ? "+" : "";
|
||||
const delta = `${sign}${(strike - px).toFixed(0)}`;
|
||||
if (!plan?.atm_open_offset_enabled) {
|
||||
return `${delta} · 偏差限制关`;
|
||||
}
|
||||
const lim = plan?.max_atm_open_offset ?? 3;
|
||||
const ok = abs <= lim + 1e-9;
|
||||
return `${sign}${(strike - px).toFixed(0)} · 开仓${ok ? "可" : "不可"}(|Δ|≤${lim})`;
|
||||
return `${delta} · 开仓${ok ? "可" : "不可"}(|Δ|≤${lim})`;
|
||||
})()}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user