Add fixed-direction switch for perp/option open side.
When enabled, lock perp long→buy Put or short→buy Call with ITM/ATM only; off keeps ATM/ask rules. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -130,9 +130,13 @@ export default function PlanPage() {
|
||||
|
||||
const bias = snap?.ask_compare?.bias;
|
||||
const biasTag =
|
||||
bias === "strike_below_spot" || bias === "call_ask_gt_put" ? (
|
||||
bias === "strike_below_spot" ||
|
||||
bias === "call_ask_gt_put" ||
|
||||
bias === "fixed_short_call" ? (
|
||||
<span className="tag up">买 Call + 永续空</span>
|
||||
) : bias === "strike_above_spot" || bias === "put_ask_gt_call" ? (
|
||||
) : bias === "strike_above_spot" ||
|
||||
bias === "put_ask_gt_call" ||
|
||||
bias === "fixed_long_put" ? (
|
||||
<span className="tag down">买 Put + 永续多</span>
|
||||
) : (
|
||||
<span className="tag">等待 / 相等</span>
|
||||
@@ -149,9 +153,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 atmRule = plan?.fixed_direction_enabled
|
||||
? plan?.fixed_perp_side === "short"
|
||||
? "固定:永续空+买Call(实/平)"
|
||||
: "固定:永续多+买Put(实/平)"
|
||||
: 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)}`
|
||||
@@ -337,9 +345,13 @@ export default function PlanPage() {
|
||||
<span className="mono">
|
||||
剩余≥{fmt(plan?.min_option_hours, 0)}h · 期权杠杆≥
|
||||
{fmt(plan?.min_option_leverage, 0)}x
|
||||
{plan?.atm_open_offset_enabled
|
||||
? ` · ATM偏差≤${fmt(plan?.max_atm_open_offset ?? 3, 0)}`
|
||||
: " · ATM偏差关"}
|
||||
{plan?.fixed_direction_enabled
|
||||
? plan?.fixed_perp_side === "short"
|
||||
? " · 固定空+Call(实/平)"
|
||||
: " · 固定多+Put(实/平)"
|
||||
: plan?.atm_open_offset_enabled
|
||||
? ` · ATM偏差≤${fmt(plan?.max_atm_open_offset ?? 3, 0)}`
|
||||
: " · ATM偏差关"}
|
||||
</span>
|
||||
</div>
|
||||
<div className="kv">
|
||||
|
||||
Reference in New Issue
Block a user