{# Hub iframe tab fragment — shared via embed_templates #} {% 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)
{{ funds_fmt(s.net_pnl_u) }}
亏损额合计(U)
{{ funds_fmt(s.loss_sum_u) }}
单笔最大亏损(U)
{% if s.max_single_loss is not none %}{{ funds_fmt(s.max_single_loss) }}{% else %}-{% endif %}
单笔最大盈利(U)
{% if s.max_single_profit is not none %}{{ funds_fmt(s.max_single_profit) }}{% else %}-{% endif %}
最大回撤(U)
{{ funds_fmt(s.max_drawdown_u) }}
当前连续亏损笔数
{{ s.consecutive_losses }}
最长连续亏损(交易日)
{{ s.max_loss_streak_days }} 天
期内最大亏损日
{% if s.worst_day %}{{ s.worst_day }}({{ funds_fmt(s.worst_day_pnl) }}U){% else %}-{% endif %}
{% endmacro %}
{% if page == 'key_monitor' %} {% include 'key_monitor_panel.html' %} {% elif page == 'trade' %}

实盘下单监控

{% if focus_order_id %} 放大查看K线(100根) {% else %} 暂无持仓可放大 {% endif %}
{% include order_rule_tips_tpl %}
{% if position_sizing_mode != 'full_margin' %} {% endif %} 成交价自动取交易所实时+成交回报
{% include 'order_plan_preview_bar.html' %}

实时持仓

{% for o in order %}
{{ o.exchange_symbol or o.symbol }} {% if o.time_close_enabled %} 时间平仓 {{ o.time_close_hours or '' }}h · --:--:-- {% endif %} {{ '做多' if o.direction == 'long' else '做空' }}
平仓
来源: {{ o.monitor_type|default('下单监控', true) }}{% if o.key_signal_type %} · {{ o.key_signal_type }}{% endif %} 风格: {{ o.trade_style or 'trend' }} 风险: {% if position_sizing_mode == 'full_margin' %}{{ funds_fmt(o.risk_amount) if o.risk_amount is not none else '-' }}U{% else %}{{ o.risk_percent or '-' }}%≈{{ funds_fmt(o.risk_amount) if o.risk_amount is not none else '-' }}U{% endif %} {% if o.breakeven_enabled %}移动保本:开 {{ o.breakeven_rr_trigger or '-' }}R→{{ price_fmt(o.symbol, o.breakeven_price) }}{% else %}移动保本:关{% endif %}
成交价 {{ price_fmt(o.symbol, o.trigger_price) }}
止损 {{ price_fmt(o.symbol, o.stop_loss) if o.stop_loss else '—' }}
止盈 {{ price_fmt(o.symbol, o.take_profit) if o.take_profit else '—' }}
盈亏比 {% if o.rr_ratio is not none %}{{ '%g'|format(o.rr_ratio) }}:1{% else %}-:1{% endif %}
标记价 -
浮盈亏 -
交易所止盈止损
止损:加载中…
止盈:加载中…
{% else %}
暂无持仓
{% endfor %}

挂止盈止损

将先撤销该合约已有 TP/SL,再按下列价格重挂。

{% elif page in ('strategy', 'strategy_trend', 'strategy_roll') %} {% include 'strategy_trading_page.html' %} {% elif page == 'strategy_records' %} {% include 'strategy_records_page.html' %} {% 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 '做空' }} {{ price_fmt(r.symbol, r.trigger_price) }}{{ price_fmt(r.symbol, stop_show) }} {{ price_fmt(r.symbol, tp_show) }} {% if r.margin_capital is not none and r.margin_capital != '' %}{{ funds_fmt(r.margin_capital) }}{% else %}-{% endif %} {{ 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] }}{{ funds_fmt(r.effective_pnl_amount or 0) }}{% if r.display_pnl_source == 'exchange' %}{% elif r.display_pnl_source != 'reviewed' %}{% endif %} {% set effective_result = r.effective_result %} {% if effective_result in ["止盈","保本止盈","移动止盈"] %}{{ effective_result }} {% elif effective_result in ["止损","强制清仓","手动平仓"] %}{{ effective_result }} {% elif effective_result == "时间平仓" %}{{ effective_result }} {% else %}{{ effective_result }}{% endif %}

记录错过机会

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

双周期上下排列;截止=平仓时间:开仓前背景至平仓;截止=当前时间:最近 N 根至此刻(可看平仓后走势);标注开仓、平仓与止损位

AI复盘(按交易记录)

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

数据统计

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