{% extends "base.html" %} {% block title %}统计分析 - 国内期货监控系统{% endblock %} {% block content %}
总交易
{{ total }}
止盈
{{ win }}
止损
{{ loss }}
胜率
{{ rate }}%
累计手续费
{{ total_fee }} 元
毛盈亏合计
{{ total_gross }} 元
净盈亏合计
{{ total_net }} 元
计费笔数
{{ fee_count }}

按品种统计

{% for s in by_symbol %} {% else %} {% endfor %}
品种交易次数止盈次数胜率
{{ s.symbol_name or s.symbol }} {{ s.cnt }} {{ s.wins }} {{ round(s.wins / s.cnt * 100, 2) if s.cnt else 0 }}%
暂无数据

手续费按品种(交易记录)

{% for f in fee_by_symbol %} {% else %} {% endfor %}
品种笔数累计手续费(元)
{{ f.symbol_name or f.symbol }} {{ f.cnt }} {{ round(f.total_fee, 2) }}
暂无手续费数据

按类型统计

{% for t in by_type %} {% else %} {% endfor %}
类型交易次数止盈次数胜率
{{ t.monitor_type }} {{ t.cnt }} {{ t.wins }} {{ round(t.wins / t.cnt * 100, 2) if t.cnt else 0 }}%
暂无数据

按方向统计

{% for d in by_direction %} {% else %} {% endfor %}
方向交易次数止盈次数胜率
{{ '做多' if d.direction == 'long' else '做空' }} {{ d.cnt }} {{ d.wins }} {{ round(d.wins / d.cnt * 100, 2) if d.cnt else 0 }}%
暂无数据

最近 10 笔交易记录

{% for r in recent %} {% else %} {% endfor %}
品种方向毛盈亏手续费净盈亏结果时间
{{ r.symbol_name or r.symbol }} {{ '做多' if r.direction == 'long' else '做空' }} {{ r.pnl if r.pnl is not none else '-' }} {{ 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.result == '止盈' %}止盈 {% elif r.result == '止损' %}止损 {% else %}{{ r.result or '-' }}{% endif %} {{ r.close_time[:16] if r.close_time else (r.created_at[:16] if r.created_at else '') }}
暂无数据
{% endblock %}