{% 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 in ('records', 'plan_history') %}
列表筛选(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
实时价格更新时间:--(北京时间 UTC+8)
{% if page == 'trade' %}

机器人下单监控(单仓)

{% if focus_order_id %} 放大查看K线(100根) {% else %} 暂无持仓可放大 {% endif %}
规则:最大同时持仓 {{ max_active_positions }}(与 Gate 主站 MAX_ACTIVE_POSITIONS 一致,当前 active {{ active_count }});与「趋势回调」计划互斥;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 }} 补足到 {{ money_fmt(auto_transfer_amount) }}U,来自 {{ auto_transfer_from }})
成交价自动取交易所实时+成交回报

实时持仓

{% for o in order %} {% set osym = o.exchange_symbol or o.symbol %}
{{ osym }} {{ '做多' if o.direction == 'long' else '做空' }}
平仓
来源: 下单监控 | 风格: {{ o.trade_style or 'trend' }} | 风险: {% if o.risk_percent is not none %}{{ o.risk_percent }}%{% else %}—{% endif %}≈{{ money_fmt(o.risk_amount) }}U | {% if o.breakeven_enabled %}移动保本: 开 {{ o.breakeven_rr_trigger or '-' }}R→{{ price_fmt(osym, o.breakeven_price) }}{% else %}移动保本: 关{% endif %}
成交价 {{ price_fmt(osym, o.trigger_price) }}
止损 {{ price_fmt(osym, o.stop_loss) }}
止盈 {{ price_fmt(osym, o.take_profit) }}
盈亏比 {% if o.rr_ratio is not none %}{{ '%.2f'|format(o.rr_ratio) }}:1{% else %}—{% endif %}
标记价 -
浮盈亏 -
保证金: - | 计划基数: {{ money_fmt(o.margin_capital) }}U | 杠杆: {{ o.leverage }}x | 仓位占比: {{ o.position_ratio }}%
{% else %}
暂无机器人持仓
{% endfor %}

趋势回调策略

生成预览:读取合约 USDT 可用余额快照并计算计划(不下单)。预览有效期 {{ trend_pullback_preview_ttl }} 秒
确认执行:市价首仓 50% + 挂交易所止损;首仓后可手动保本(默认均价+{{ trend_manual_breakeven_offset_pct }}%);剩余 50% 在止损与补仓区间之间共 {{ trend_pullback_dca_legs }} 档(做多为上沿、做空为下沿;程序可能因最小张数自动减档)市价补仓;止盈由程序监控
确认执行时若当前可用余额与预览快照相对偏差 > {{ trend_preview_max_drift_pct }}% 会拒绝并要求重新预览。
{% if trend_preview %}
当前预览(剩余 {{ trend_pullback_preview_ttl }}s) 倒计时加载中…
{{ trend_preview.symbol }} {{ '做多' if trend_preview.direction == 'long' else '做空' }} {{ trend_preview.leverage }}x | 预览可用快照 {{ money_fmt(trend_preview.snapshot_available_usdt) }} U | 参考价 {{ price_fmt(trend_preview.symbol, trend_preview.live_price_ref) }} | 计划保证金≈{{ money_fmt(trend_preview.plan_margin_capital) }} U | 总张≈{{ amt_fmt(trend_preview.symbol, trend_preview.target_order_amount) }}(首仓 {{ amt_fmt(trend_preview.symbol, trend_preview.first_order_amount) }} + 补仓 {{ amt_fmt(trend_preview.symbol, trend_preview.remainder_total) }})
止损 {{ price_fmt(trend_preview.symbol, trend_preview.stop_loss) }} | {{ trend_add_zone_label(trend_preview.direction) }} {{ price_fmt(trend_preview.symbol, trend_preview.add_upper) }} | 止盈 {{ price_fmt(trend_preview.symbol, trend_preview.take_profit) }} | 风险比例 {{ trend_preview.risk_percent }}%
{% for row in trend_preview_levels %} {% endfor %}
#补仓触发价该档张数
{{ row.i }}{{ price_fmt(trend_preview.symbol, row.price) }}{{ amt_fmt(trend_preview.symbol, row.contracts) }}
{% elif trend_preview_expired %}
该预览已过期(超过 {{ trend_pullback_preview_ttl }} 秒),请重新点击「生成预览」。
{% endif %}

运行中的计划

{% for t in trend_plans %} {% set sym = t.exchange_symbol or t.symbol %} {% set calc = namespace(rr=None, pnlpct=None) %} {% if t.avg_entry_price is not none and t.stop_loss is not none and t.take_profit is not none %} {% set e = t.avg_entry_price|float %} {% set sl = t.stop_loss|float %} {% set tp = t.take_profit|float %} {% if t.direction == 'long' %} {% set risk = e - sl %} {% set reward = tp - e %} {% else %} {% set risk = sl - e %} {% set reward = e - tp %} {% endif %} {% if risk > 0 %} {% set calc.rr = reward / risk %} {% endif %} {% endif %} {% if t.floating_pnl is not none and t.plan_margin_capital is not none and t.plan_margin_capital|float > 0 %} {% set calc.pnlpct = (t.floating_pnl|float) / (t.plan_margin_capital|float) * 100 %} {% endif %}
#{{ t.id }} {{ sym }} {{ '做多' if t.direction == 'long' else '做空' }}
结束计划
来源: 趋势回调计划 | 风险: {% if t.risk_percent is not none %}{{ t.risk_percent }}%{% else %}—{% endif %} | {{ trend_add_zone_label(t.direction) }} {{ price_fmt(sym, t.add_upper) }} | 已补仓 {{ t.legs_done }}/{{ t.dca_legs }}
均价 {% if t.avg_entry_price is not none %}{{ price_fmt(sym, t.avg_entry_price) }}{% else %}—{% endif %}
止损 {{ price_fmt(sym, t.stop_loss) }}
止盈 {{ price_fmt(sym, t.take_profit) }}
盈亏比 {% if calc.rr is not none %}{{ '%.2f'|format(calc.rr) }}:1{% else %}—{% endif %}
标记价 {% if t.floating_mark is not none %}{{ price_fmt(sym, t.floating_mark) }}{% else %}—{% endif %}
浮盈亏 {% if t.floating_pnl is not none %} {{ money_fmt(t.floating_pnl) }}U{% if calc.pnlpct is not none %} ({{ '%+.2f'|format(calc.pnlpct) }}%){% endif %} {% else %}—{% endif %}
{% if t.breakeven_applied %}已保本 {{ (t.breakeven_applied_at or '')[:16] }}{% endif %} {% if t.initial_stop_loss is not none and t.initial_stop_loss != t.stop_loss %}原止损 {{ price_fmt(sym, t.initial_stop_loss) }}{% endif %}
快照可用: {% if t.snapshot_available_usdt is not none %}{{ money_fmt(t.snapshot_available_usdt) }}U{% else %}—{% endif %} | 计划保证金≈{% if t.plan_margin_capital is not none %}{{ money_fmt(t.plan_margin_capital) }}U{% else %}—{% endif %} | 总张≈{{ amt_fmt(sym, t.target_order_amount) }}(首{{ amt_fmt(sym, t.first_order_amount) }} + 补{{ amt_fmt(sym, t.remainder_total) }}) | 杠杆: {{ t.leverage }}x
{% else %}
暂无运行中的趋势回调计划
{% endfor %}
{% 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 %}

记录错过机会

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

AI复盘(按交易记录)

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

已结束的趋势回调计划

删除将同时移除 trend_plan_id 关联的「趋势回调」交易记录及该计划对应的预览快照归档。交易所平仓同步起点(北京日期):{{ exchange_sync_from_label }}EXCHANGE_POSITION_SYNC_FROM_BJ)。
{% if plan_history and plan_history|length > 0 %}
{% for p in plan_history %} {% endfor %}
ID品种方向杠杆状态结束开仓时间计划保证金≈操作
{{ p.id }} {{ p.symbol }} {{ '做多' if p.direction == 'long' else '做空' }} {{ p.leverage }}x {{ p.status_label }} {{ p.message or '-' }} {{ (p.opened_at or '-')[:16] }} {% if p.plan_margin_capital is not none %}{{ money_fmt(p.plan_margin_capital) }}{% else %}-{% endif %}
{% else %}
暂无已结束的计划
{% endif %}

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

每次「生成预览」自动归档;取消、过期或执行后仍可点开查看当时参数。执行后状态为「已执行」并带关联计划 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 %}
详情