Show initial and current roll position size plus rolling status on active roll groups table.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 16:45:32 +08:00
parent f5f302b97e
commit 5ef6affabf
4 changed files with 38 additions and 5 deletions
@@ -55,21 +55,24 @@
<h3 class="roll-section-title">活跃滚仓组</h3>
<div class="table-wrap">
<table>
<tr><th>ID</th><th>币种</th><th>方向</th><th>腿数</th><th>首仓TP</th><th>当前SL</th><th>当前均价</th><th>止盈盈利U</th></tr>
<table class="roll-active-groups-table">
<tr><th>ID</th><th>币种</th><th>方向</th><th>腿数</th><th>首仓张数</th><th>加仓后张数</th><th>首仓TP</th><th>当前SL</th><th>当前均价</th><th>止盈盈利U</th><th>状态</th></tr>
{% for g in roll_groups %}
<tr>
<td>{{ g.id }}</td>
<td>{{ g.symbol }}</td>
<td>{{ g.direction }}</td>
<td>{{ g.leg_count }}</td>
<td>{% if g.initial_qty is not none %}{{ '%.4g'|format(g.initial_qty) }}{% else %}—{% endif %}</td>
<td>{% if g.current_qty is not none %}{{ '%.4g'|format(g.current_qty) }}{% else %}—{% endif %}</td>
<td>{% if price_fmt %}{{ price_fmt(g.symbol, g.initial_take_profit) }}{% else %}{{ g.initial_take_profit }}{% endif %}</td>
<td>{% if price_fmt %}{{ price_fmt(g.symbol, g.current_stop_loss) }}{% else %}{{ g.current_stop_loss }}{% endif %}</td>
<td>{% if g.avg_entry_display %}{{ g.avg_entry_display }}{% elif g.avg_entry is not none %}{{ g.avg_entry }}{% else %}—{% endif %}</td>
<td>{% if g.reward_at_tp_usdt is not none %}{{ '%.2f'|format(g.reward_at_tp_usdt) }}{% else %}—{% endif %}</td>
<td class="roll-tp-profit">{% if g.reward_at_tp_usdt is not none %}{{ '%.2f'|format(g.reward_at_tp_usdt) }}{% else %}—{% endif %}</td>
<td class="roll-status-active">滚仓中</td>
</tr>
{% else %}
<tr><td colspan="8" style="color:#8892b0">暂无</td></tr>
<tr><td colspan="11" style="color:#8892b0">暂无</td></tr>
{% endfor %}
</table>
</div>