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

{{ title }}

{{ pair.range_label }}
机器人下单监控
{{ period_metrics_cells(pair.order) }}
趋势回调策略
{{ period_metrics_cells(pair.trend) }}
{% endmacro %}

加密货币|Gate 机器人交易监控

{{ exchange_display }}
关键位监控 交易执行 策略交易 策略交易记录 交易记录与复盘 统计分析
{% with msg=get_flashed_messages() %}{% if msg %}
{{ msg[0] }}
{% endif %}{% endwith %} {% if page == 'records' %}
列表筛选(UTC,默认当日):{{ list_window.label }} 统计页仍按北京时间 {{ reset_hour }}:00 切日
{% endif %}
数据导出(v{{ data_export_version }} CSV,UTF-8;交易记录含开仓类型列及交易所对齐字段): 交易记录 关键位(当前) 关键位历史
交易所
{{ exchange_display }}
总交易
{{ total }}
错过次数
{{ miss_count }}
胜率
{{ rate }}%
资金账户(USDT)
{% if funding_usdt is not none %}{{ money_fmt(funding_usdt) }}U{% else %}—{% endif %}
交易日
{{ trading_day }}
当日资金(交易账户)
{{ money_fmt(current_capital) }}U
{% include 'gate_transfer_block.html' %}
{% if page == 'key_monitor' %} {% include 'key_monitor_panel.html' %} {% elif page == 'trade' %}

机器人下单监控(单仓)

{% if focus_order_id %} 放大查看K线(100根) {% else %} 暂无持仓可放大 {% endif %}
规则:最大同时持仓 {{ max_active_positions }}(当前 active {{ active_count }});与「趋势回调」计划互斥;BTC {{ btc_leverage }}x / 山寨 {{ alt_leverage }}x; 本交易日开仓 {{ opens_today }}{% if daily_open_hard_limit > 0 %} / 硬上限 {{ daily_open_hard_limit }}{% endif %}(AI 提醒 {{ daily_open_alert_threshold }}); {% if can_trade %}可开仓{% else %}不可开仓(持仓达上限、单日开仓达上限、有趋势回调计划,或未到北京时间 {{ reset_hour }}:00){% endif %}; 人工开仓盈亏比不得低于 {{ manual_min_planned_rr }}:1
计仓模式:{{ position_sizing_mode_label }}(仅 .env POSITION_SIZING_MODE,须无仓后重启) {% if position_sizing_mode == 'full_margin' %} |全仓:合约可用×{{ full_margin_buffer_ratio }},BTC/ETH {{ btc_leverage }}x、其它 {{ alt_leverage }}x,单仓;张数按交易所精度 {% else %} |以损定仓:风险 {{ risk_percent }}% {% endif %} |移动保本:下单可勾选关闭;开启时 {{ breakeven_rr_trigger }}R 触发(每 1R 阶梯上移),偏移 {{ breakeven_offset_pct }}%
{% if position_sizing_mode != 'full_margin' %} {% endif %} 成交价自动取交易所实时+成交回报

实时持仓

{% if orphan_positions %}
交易所有持仓,但本地 order_monitors 无 active 记录(中控仍可能显示交易所实盘)。可点「恢复监控」接回最近已停止记录,或在中控全平。
{% endif %} {% if not order and not orphan_positions %}
暂无持仓
{% endif %} {% for o in order %}
{{ o.exchange_symbol or o.symbol }} {{ '做多' 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' %}{{ money_fmt(o.risk_amount) if o.risk_amount is not none else '-' }}U{% else %}{{ o.risk_percent or '-' }}%≈{{ money_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 %}
标记价 -
浮盈亏 -
交易所止盈止损
止损:加载中…
止盈:加载中…
{% endfor %} {% for op in orphan_positions %}
{{ op.exchange_symbol or op.symbol }} {{ '做多' if op.direction == 'long' else '做空' }} 仅交易所
张数: {{ op.contracts }} 开仓价: {{ price_fmt(op.symbol, op.entry_price) }} 标记价: {{ price_fmt(op.symbol, op.mark_price) }} {% if op.unrealized_pnl is not none %} 浮盈亏: {{ money_fmt(op.unrealized_pnl) }}U {% endif %}
{% endfor %}

挂止盈止损

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

{% elif page in ('strategy', 'strategy_trend', 'strategy_roll') %} {% set can_trade_trend = can_trade %} {% include 'strategy_trading_page.html' %} {% elif page == 'strategy_records' %} {% include 'strategy_records_page.html' %} {% endif %} {% if page == 'records' %}

交易记录与复盘

{% for r in record %} {% set stop_show = r.effective_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.display_pnl_amount or 0)|float %} {% endfor %}
品种类型方向成交止损止盈基数杠杆持仓分钟开仓(展示)平仓(展示)盈亏U(展示)结果操作
{{ r.symbol }} {{ r.monitor_type }} {{ '做多' 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 != '' %}{{ money_fmt(r.margin_capital) }}{% else %}-{% endif %} {{ r.leverage or '-' }} {{ r.effective_hold_minutes or 0 }} {{ r.display_opened_at }} {{ r.display_closed_at }}{{ money_fmt(r.display_pnl_amount) }}{% if r.monitor_type == '趋势回调' and r.display_pnl_source == 'local' %}{% elif r.monitor_type == '趋势回调' and r.display_pnl_source == 'exchange' %}{% endif %} {% set effective_result = r.effective_result %} {% if effective_result in ["止盈","保本止盈","移动止盈"] %}{{ effective_result }} {% elif effective_result in ["止损","强制清仓","手动平仓"] %}{{ effective_result }} {% else %}{{ effective_result }}{% endif %}

记录错过机会

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

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

AI复盘(按交易记录)

交易复盘记录
AI历史复盘

预览快照(自本版本起留存)

每次「生成预览」自动归档;取消、过期或执行后仍可点开查看当时参数。执行后状态为「已执行」并带关联计划 ID。
{% if preview_snapshots and preview_snapshots|length > 0 %}
{% for s in preview_snapshots %} {% endfor %}
ID时间品种方向杠杆状态快照余额U操作
{{ s.id }} {{ (s.preview_created_at or '-')[:16] }} {{ s.symbol }} {{ '多' if s.direction == 'long' else '空' }} {{ s.leverage }}x {{ s.outcome_label }}{% if s.executed_plan_id %} #{{ s.executed_plan_id }}{% endif %} {{ money_fmt(s.snapshot_available_usdt) }}
{% else %}
暂无预览快照(新版本生成预览后将出现在此)
{% endif %}
{% endif %}
{% if page == 'stats' %}

数据统计

持仓占用导致错过(累计)
{{ occupied_miss_total }}
已平仓记录按平仓时间归入北京时间交易日;胜率按盈笔数/(盈+亏)。各策略分列统计。
历史总开仓(累计):下单监控 {{ stats_bundle.total_opens_order }} 次 | 趋势回调 {{ stats_bundle.total_opens_trend }} 次 (合计 {{ stats_bundle.total_opens_all }} 次)
{{ period_stats_dual("日统计", stats_bundle.day) }} {{ period_stats_dual("周统计", stats_bundle.week) }} {{ period_stats_dual("月统计", stats_bundle.month) }}
{% endif %}
详情