Fix roll position display: live contracts, TP profit, and 2-decimal qty precision.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 17:06:33 +08:00
parent 5ef6affabf
commit e3e53ff7f5
15 changed files with 217 additions and 33 deletions
@@ -63,8 +63,8 @@
<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 g.initial_qty is not none %}{{ '%.2f'|format(g.initial_qty) }}{% else %}—{% endif %}</td>
<td>{% if g.current_qty is not none %}{{ '%.2f'|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>