Support dual breakout targets for options-options hedges.

Replace single S* with up/down targets across UI, preview, persist, monitor, and alerts so ranging breakouts can close the winner either way.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-14 14:32:06 +08:00
parent f6ef06f659
commit 8ecc70a61c
13 changed files with 233 additions and 53 deletions
@@ -118,11 +118,14 @@
<div class="form-row hp-uly-row">
<button type="button" class="btn-secondary hp-uly-btn-oo active" data-uly="ETH">ETH</button>
<button type="button" class="btn-secondary hp-uly-btn-oo" data-uly="BTC">BTC</button>
<label>目标价 S* <input type="number" step="any" id="hp-target" /></label>
</div>
<div class="form-row hp-target-row">
<label>上破目标 <input type="number" step="any" id="hp-target-up" placeholder="向上突破" /></label>
<label>下破目标 <input type="number" step="any" id="hp-target-down" placeholder="向下突破" /></label>
</div>
<div id="hp-oo-index" class="muted hp-quote-line"></div>
<div id="hp-oo-bal-line" class="muted hp-quote-line"></div>
<p class="muted hp-unit-hint">单位说明:目标价=指数价(USD) · 张数=<strong>期权张</strong>(整张) · 权利金结算币=USDC</p>
<p class="muted hp-unit-hint">震荡突破:设上下两个目标价(USD);触达任一侧重平盈利腿。张数=<strong>期权张</strong> · 权利金=USDC</p>
<div id="hp-oo-legs" class="hp-oo-legs">
<div class="hp-oo-leg-row" data-leg="a">
<div class="muted" id="hp-oo-leg-a-info">腿A: 尚未选用</div>
@@ -186,7 +189,7 @@
</tr>
</thead>
<tbody id="hp-result-tbody-oo">
<tr><td colspan="6" class="muted">选用两腿并填目标后点计算</td></tr>
<tr><td colspan="6" class="muted">选用两腿并填上破/下破目标后点计算</td></tr>
</tbody>
</table>
</div>
@@ -230,4 +233,4 @@
</div>
</div>
</div>
<script src="/static/hedge_plan.js?v=11"></script>
<script src="/static/hedge_plan.js?v=12"></script>