{# Copyright (c) 2025-2026 马建军. All rights reserved. 专有软件,详见 LICENSE.zh-CN.txt #} {% extends "base.html" %} {% block title %}交易记录与复盘 - 国内期货 · 交易复盘系统{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
已连接 CTP,本页已自动同步柜台成交(新增 {{ ctp_sync_info.synced or 0 }} 条,更新 {{ ctp_sync_info.updated or 0 }} 条)。 带来源「柜台」的记录以交易所成交为准;「本地」为程序写入,可手动删除错误项。
{% else %}CTP 未连接时仅显示本地数据库记录;连接后打开本页会自动同步柜台成交。
{% endif %}暂无交易记录
{% endfor %}| 品种 | 类型 | 方向 | 成交 | 止损(开仓) | 止盈 | 手数 | 保证金 | 保证金占比 | 持仓分钟 | 开仓时间 | 平仓时间 | 盈亏(元) | 手续费 | 净盈亏 | 最新资金 | 结果 | 操作 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ t.symbol_name or t.symbol }} | {{ t.monitor_type }} {% if t.source == 'ctp' %} 柜台 {% else %} 本地 {% endif %} | {{ '做多' if t.direction == 'long' else '做空' }} | {{ t.entry_price }} | {{ t.stop_loss }} | {{ t.take_profit }} | {{ t.lots }} | {{ t.margin if t.margin is not none else '-' }} | {% if t.margin_pct is not none %}{{ t.margin_pct }}%{% else %}-{% endif %} | {{ t.holding_minutes or 0 }} | {{ (t.open_time or '')[:16].replace('T',' ') }} | {{ (t.close_time or '')[:16].replace('T',' ') }} | {{ t.pnl if t.pnl is not none else '-' }} | {{ t.fee if t.fee is not none else '-' }} | {{ t.pnl_net if t.pnl_net is not none else '-' }} | {{ t.equity_after if t.equity_after is not none else '-' }} | {% if t.result == '止盈' %}{{ t.result }} {% elif t.result == '止损' %}{{ t.result }} {% elif t.result == '移动止盈' %}{{ t.result }} {% elif t.result == '保本止盈' %}{{ t.result }} {% elif t.result == '手动平仓' %}{{ t.result }} {% else %}{{ t.result }}{% endif %} {% if t.verified %}已核对{% endif %} | |
| 暂无交易记录 | |||||||||||||||||
暂无复盘记录
{% endfor %}| 平仓 | 品种 | 方向 | 盈亏 | 手续费 | 净盈亏 | 情绪单 | 详情 | |
|---|---|---|---|---|---|---|---|---|
| {{ r.close_time[:16] if r.close_time else '' }} | {{ r.symbol_name or r.symbol }} | {{ '多' if r.direction == 'long' else '空' }} | {% if r.pnl and r.pnl > 0 %}{{ r.pnl }} {% elif r.pnl and r.pnl < 0 %}{{ r.pnl }} {% else %}{{ r.actual_pnl or '-' }}{% endif %} | {{ r.fee if r.fee is not none else '-' }} | {% if r.pnl_net and r.pnl_net > 0 %}{{ r.pnl_net }} {% elif r.pnl_net and r.pnl_net < 0 %}{{ r.pnl_net }} {% else %}-{% endif %} | {% if r.is_emotion %}情绪单{% else %}-{% endif %} | 删 | |
| 暂无复盘记录 | ||||||||
| 品种 | 类型 | 方向 | 触发价 | 结果 | 时间 |
|---|---|---|---|---|---|
| {{ r.symbol_name or r.symbol }} | {{ r.monitor_type }} | {{ '多' if r.direction == 'long' else '空' }} | {{ r.trigger_price }} | {% if r.result == '止盈' %}止盈{% else %}止损{% endif %} | {{ r.created_at[:16] if r.created_at else '' }} |