双买持仓表新增盈亏平衡点列;交易记录无平仓品种时隐藏统计面板
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
{% if open_trades %}
|
||||
<div class="table-wrap">
|
||||
<table>
|
||||
<tr><th>品种</th><th>合约</th><th>C行权价</th><th>P行权价</th><th>开仓日期</th><th>看涨开仓价</th><th>看跌开仓价</th><th>C手续费</th><th>P手续费</th><th>总成本</th><th>操作</th></tr>
|
||||
<tr><th>品种</th><th>合约</th><th>C行权价</th><th>P行权价</th><th>开仓日期</th><th>看涨开仓价</th><th>看跌开仓价</th><th>C手续费</th><th>P手续费</th><th>总成本</th><th>平衡(上)</th><th>平衡(下)</th><th>操作</th></tr>
|
||||
{% for t in open_trades %}
|
||||
<tr>
|
||||
<td>{{ t.product_code }}</td>
|
||||
@@ -100,6 +100,8 @@
|
||||
<td>{{ t.call_open_fee or 0 }}</td>
|
||||
<td>{{ t.put_open_fee or 0 }}</td>
|
||||
<td><b>{{ "%.0f"|format(t.total_cost) }}</b></td>
|
||||
<td style="color:var(--danger-fg);font-weight:600;">{{ "%.1f"|format(t.breakeven_upper) }}</td>
|
||||
<td style="color:var(--success-fg);font-weight:600;">{{ "%.1f"|format(t.breakeven_lower) }}</td>
|
||||
<td>
|
||||
<button style="background:var(--warn);color:#fff;border:none;padding:3px 10px;border-radius:4px;cursor:pointer;font-size:0.78rem;"
|
||||
onclick="showOpenAnalysis('{{ t.product_code }} {{ t.contract_code.replace(t.product_code, '', 1) }}', {{ t.call_strike_price }}, {{ t.put_strike_price }}, {{ t.call_open_price }}, {{ t.put_open_price }}, {{ t.call_open_fee or 0 }}, {{ t.put_open_fee or 0 }}, {{ t.point_value }})">分析</button>
|
||||
|
||||
Reference in New Issue
Block a user