Align options realtime PnL with bid-net and show totals in stats.

Header float PnL now uses bid recycle minus premium like position cards. Stats adds realized/open/total net PnL.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-15 22:00:45 +08:00
parent 60f3437c73
commit ee7be3e7f3
14 changed files with 198 additions and 19 deletions
+15 -1
View File
@@ -152,6 +152,20 @@
</div>
<div class="options-pos-pane" data-opt-pos-pane="stats" role="tabpanel" aria-labelledby="opt-pos-tab-stats" hidden>
<div class="options-stats-panel">
<div class="options-stats-pnl-summary" id="opt-stats-pnl-summary">
<div class="options-stat-item opt-stats-net-item">
<span class="k">合计盈亏</span>
<span class="v" id="opt-stats-total-pnl"></span>
</div>
<div class="options-stat-item">
<span class="k">已平净盈亏</span>
<span class="v" id="opt-stats-net-realized"></span>
</div>
<div class="options-stat-item">
<span class="k">持仓浮盈</span>
<span class="v" id="opt-stats-open-float"></span>
</div>
</div>
<div class="options-stats-charts">
<div class="opt-stats-chart opt-stats-chart--ring">
<div class="opt-stats-ring" id="opt-stats-ring" style="--win-pct: 0">
@@ -258,4 +272,4 @@
</div>
</div>
<script src="/static/options_expiry_countdown.js?v=1"></script>
<script src="/static/options_panel.js?v=29"></script>
<script src="/static/options_panel.js?v=30"></script>