From 0fcc7eea031837c0db0a30240b874feb1b2e13ba Mon Sep 17 00:00:00 2001 From: fish Date: Tue, 28 Jul 2026 09:56:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E5=B9=B3=E4=BB=93=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B9=B3=E4=BB=93=E7=9B=88=E4=BA=8F=E5=88=97?= =?UTF-8?q?=EF=BC=8C=E5=B1=95=E7=A4=BA=E4=BB=B7=E5=B7=AE=E6=AF=9B=E5=88=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- ft-app/app/templates/trades.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ft-app/app/templates/trades.html b/ft-app/app/templates/trades.html index e76bff4..8cef70e 100644 --- a/ft-app/app/templates/trades.html +++ b/ft-app/app/templates/trades.html @@ -197,7 +197,7 @@
{{ pc }} · {{ trades|length }} 笔
{% endif %} - + {% for t in trades %} @@ -215,6 +215,16 @@ +
合约方向开仓平仓持仓开仓价平仓价开仓费平仓费盈亏操作
合约方向开仓平仓持仓开仓价平仓价开仓费平仓费平仓盈亏盈亏操作
{{ t.contract_code.replace(t.product_code, '', 1) }}{{ t.close_price }} {{ t.open_fee or 0 }} {{ t.close_fee or 0 }} + {% if t.direction == 'short' %} + {% set gross_pnl = (t.open_price - t.close_price) * t.point_value %} + {% else %} + {% set gross_pnl = (t.close_price - t.open_price) * t.point_value %} + {% endif %} + + {% if gross_pnl > 0 %}+{% endif %}{{ '%.2f'|format(gross_pnl) }} + + {% set p = t.pnl %} {% if p is not none %}