{% macro period_stats(title, s) %}

{{ title }}

{{ s.range_label }}
开单次数
{{ s.opens_count }}
平仓笔数
{{ s.closed_count }}
胜率
{% if s.win_rate_pct is not none %}{{ s.win_rate_pct }}%{% else %}-{% endif %}
净盈亏(U)
{{ s.net_pnl_u }}
亏损额合计(U)
{{ s.loss_sum_u }}
单笔最大亏损(U)
{% if s.max_single_loss is not none %}{{ s.max_single_loss }}{% else %}-{% endif %}
单笔最大盈利(U)
{% if s.max_single_profit is not none %}{{ s.max_single_profit }}{% else %}-{% endif %}
最大回撤(U)
{{ s.max_drawdown_u }}
当前连续亏损笔数
{{ s.consecutive_losses }}
最长连续亏损(交易日)
{{ s.max_loss_streak_days }} 天
期内最大亏损日
{% if s.worst_day %}{{ s.worst_day }}({{ s.worst_day_pnl }}U){% else %}-{% endif %}
{% endmacro %}

加密货币|交易监控 + AI复盘一体化

交易执行 交易记录与复盘 统计分析
{% with msg=get_flashed_messages() %}{% if msg %}
{{ msg[0] }}
{% endif %}{% endwith %}
列表筛选(UTC,默认当日):{{ list_window.label }} 统计页仍按北京时间 {{ stats_bundle.stats_reset_hour|default(reset_hour) }}:00 切日
数据导出(v{{ data_export_version }} CSV,UTF-8;交易记录含开仓类型列,复盘单独导出): 交易记录 复盘记录 关键位(当前) 关键位历史
总交易
{{ total }}
错过次数
{{ miss_count }}
胜率
{{ rate }}%
训练总资金(资金账户)
{{ total_capital }}U
交易日
{{ trading_day }}
当日资金(交易账户)
{{ current_capital }}U
实时价格更新时间:--(北京时间 UTC+8)
{% if page == 'trade' %}

关键位监控(5m)

{% if focus_key_id %} 放大查看K线(默认200根) {% else %} 输入币种查看K线 {% endif %}
{{ key_gate_rule_text }}
{% for k in key %}
{{ k.symbol }} | {{ k.monitor_type }} | {{ '做多' if k.direction == 'long' else '做空' }}
上:{{ k.upper }} 下:{{ k.lower }} {% if k.fib_entry_price %}| 挂E:{{ k.fib_entry_price }}{% endif %} | 已提醒:{{ k.notification_count or 0 }}/{{ k.max_notify or 3 }} | 现价:- | 距上沿:- | 距下沿:- | 门控:-
{% endfor %}

关键位历史(满次提醒或手动删除)

满 {{ key_alert_max_times }} 次企业微信提醒后自动移入此处;手动删除也会归档。受顶栏 UTC 列表时间窗筛选。
{% for h in key_history %}
{{ h.symbol }} | {{ h.monitor_type }} | {{ '做多' if h.direction == 'long' else '做空' }} | {{ h.close_reason }}
上:{{ h.upper }} 下:{{ h.lower }} | 提醒次数:{{ h.notification_count }} | {{ (h.closed_at or '-')[:16] }}
{% if h.last_alert_message %}
{{ h.last_alert_message[:200] }}{% if h.last_alert_message|length > 200 %}…{% endif %}
{% endif %}
{% else %}
暂无历史
{% endfor %}

实盘下单监控

{% if focus_order_id %} 放大查看K线(100根) {% else %} 暂无持仓可放大 {% endif %}
规则:单仓;BTC {{ btc_leverage }}x / 山寨 {{ alt_leverage }}x; {% if can_trade %}可开仓{% else %}不可开仓(有持仓或未到北京时间 {{ reset_hour }}:00){% endif %}; 按风险比例自动计算仓位
以损定仓:风险 {{ risk_percent }}% |移动保本:{{ breakeven_rr_trigger }}R 触发(每 1R 阶梯上移),偏移 {{ breakeven_offset_pct }}%
划转:自动划转 {{ '开启' if auto_transfer_enabled else '关闭' }}(每天北京时间 {{ auto_transfer_bj_hour }}:00起该整点小时内尝试;账簿按 UTC 自然日去重;界面时间为北京;将 {{ auto_transfer_to }} 补足到 {{ auto_transfer_amount }}U,来自 {{ auto_transfer_from }})
成交价自动取交易所实时+成交回报
{% for o in order %}
{{ o.symbol }} | {{ '做多' if o.direction == 'long' else '做空' }}
风格:{{ o.trade_style or 'trend' }} | 风险:{{ o.risk_percent or '-' }}%≈{{ o.risk_amount or '-' }}U | {% if o.breakeven_enabled %}移动保本:开{% else %}移动保本:关{% endif %} {{ o.breakeven_rr_trigger or '-' }}R→{{ o.breakeven_price or '-' }}
成交:{{ o.trigger_price }} 止损:{{ o.stop_loss }} 止盈:{{ o.take_profit }} | 盈亏比:{% if o.rr_ratio is not none %}1:{{ '%.2f'|format(o.rr_ratio) }}{% else %}-{% endif %} | 现价:- | 浮盈亏:- | 保证金:{{ o.margin_capital }}U | 杠杆:{{ o.leverage }}x | 仓位占比:{{ o.position_ratio }}%
平仓
{% endfor %}
{% endif %} {% if page == 'records' %}

交易记录 & 错过机会

{% for r in record %} {% set pnl_val = (r.pnl_amount or 0)|float %} {% set stop_show = r.display_open_stop_loss or r.initial_stop_loss or r.stop_loss %} {% set tp_show = r.effective_take_profit or r.take_profit %} {% set pnl_val = (r.effective_pnl_amount or 0)|float %} {% endfor %}
品种类型方向成交止损(开仓)止盈基数杠杆持仓分钟开仓时间(北京)平仓时间(北京)盈亏U结果操作
{{ r.symbol }} {{ r.monitor_type }}{% if r.key_signal_type %} · {{ r.key_signal_type }}{% endif %} {{ '做多' if r.direction == 'long' else '做空' }} {{ r.trigger_price }}{{ price_fmt(r.symbol, stop_show) }} {{ price_fmt(r.symbol, tp_show) }} {{ r.margin_capital or '-' }} {{ r.leverage or '-' }} {{ r.effective_hold_minutes or 0 }} {{ (r.effective_opened_at or '-')[:16] }} {{ (r.effective_closed_at or r.created_at or '-')[:16] }}{{ r.effective_pnl_amount or 0 }} {% set effective_result = r.effective_result %} {% if effective_result in ["止盈","保本止盈","移动止盈"] %}{{ effective_result }} {% elif effective_result in ["止损","强制清仓","手动平仓"] %}{{ effective_result }} {% else %}{{ effective_result }}{% endif %}

记录错过机会

交易复盘记录上传(含截图)

AI复盘(按交易记录)

交易复盘记录
AI历史复盘
{% endif %}
{% if page == 'stats' %}

数据统计

持仓占用导致错过(累计)
{{ occupied_miss_total }}
统计分析按北京时间 {{ stats_bundle.stats_reset_hour }}:00切日计入(与顶栏 UTC 列表窗无关)。历史总开仓(累计): {{ stats_bundle.total_opens_all }}
{% for seg in stats_bundle.segments %} {% endfor %}
{% endif %}
详情