{# 三所共用 standalone 主页 — 由 scripts/build_unified_index.py 生成,勿手改三所副本 #}  {{ pwa_app_name }} {% macro period_stats_pane(period_key, s) %} {% set win_pct = s.win_rate_pct if s.win_rate_pct is not none else 0 %} {% set profit_sum = (s.net_pnl_u + s.loss_sum_u) if s.closed_count else 0 %} {% set loss_sum = s.loss_sum_u %} {% set pnl_total = profit_sum + loss_sum %} {% set profit_bar_w = (profit_sum / pnl_total * 100) if pnl_total > 0 else 0 %} {% set loss_bar_w = (loss_sum / pnl_total * 100) if pnl_total > 0 else 0 %} {% set net_cls = 'pos-pnl-profit' if s.net_pnl_u > 0 else ('pos-pnl-loss' if s.net_pnl_u < 0 else '') %}
{{ s.range_label }}
{% if s.closed_count %}
{% if s.net_pnl_u > 0 %}+{% endif %}{{ funds_fmt(s.net_pnl_u) }}U 净盈亏
{% if s.win_rate_pct is not none %}{{ win_pct|round(0)|int }}%{% else %}—{% endif %}
{{ s.win_count }}胜 {{ s.loss_count }}负
{{ s.opens_count }} / {{ s.closed_count }} 开单 / 平仓
盈亏构成
盈利 {{ funds_fmt(profit_sum) }}U 亏损 {{ funds_fmt(loss_sum) }}U
最大回撤 {{ funds_fmt(s.max_drawdown_u) }}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 %}
{% else %}

当前区间暂无平仓数据

{% endif %}
详细指标
开单次数
{{ 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 %}

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

{% if not intraday_discipline and display.show_nav_strategy %} 策略交易 {% endif %} {% if not intraday_discipline and display.show_nav_strategy_records %} 策略交易记录 {% endif %} {% if display.show_nav_records %} 交易记录与复盘 {% endif %} {% if display.show_nav_stats %} 统计分析 {% endif %} {% if options_nav_visible and display.show_nav_options %} 期权 {% endif %} {% if options_nav_visible and display.show_nav_options_review %} 期权复盘 {% endif %} {% if hedge_plan_nav_visible and display.show_nav_hedge_plan %} 对冲计划 {% endif %} {% if display.show_nav_risk_policy %} 风控说明 {% endif %} {% if display.show_nav_env_config %} env配置 {% endif %} 系统设置
{% with msg=get_flashed_messages() %}{% if msg %}
{{ msg[0] }}
{% endif %}{% endwith %} {% include 'instance_header_panel.html' %} {% if page not in ('settings', 'risk_policy', 'system_guide', 'env_config', 'options', 'options_review', 'hedge_plan') %} {% include 'instance_top_bar.html' %} {% endif %}
{% if page == 'dashboard' %} {% include 'dashboard_panel.html' %} {% elif page == 'key_monitor' %} {% include 'key_monitor_panel.html' %} {% elif page == 'trade' %}

实盘下单监控

{% if focus_order_id %} 放大查看K线(100根) {% else %} 暂无持仓可放大 {% endif %}
{% include order_rule_tips_tpl %} {% include 'order_monitor_open_form.html' %}

实时持仓

{% if ui_orphan_recovery_enabled %} {% if not order and orphan_live_positions %} {% set o = orphan_live_positions[0] %}
检测到交易所仍有 {{ o.symbol }} {{ '空' if o.direction == 'short' else '多' }}仓,但本地监控已中断(误同步时可能无交易记录). {% if o.recoverable_monitor_id %} {% else %} 未找到可恢复的监控记录,需在服务器数据库处理. {% endif %}
{% else %} {% endif %} {% endif %}
{% for o in order %}
{{ o.exchange_symbol or o.symbol }} {% if o.time_close_enabled %} 时间平仓 {{ o.time_close_hours or '' }}h · --:--:-- {% endif %} {% include 'force_close_order_badge.html' %} {{ '做多' if o.direction == 'long' else '做空' }}
{% if not intraday_discipline %} 平仓 {% endif %}
来源: {{ o.monitor_type|default('下单监控', true) }}{% if o.key_signal_type %} · {{ o.key_signal_type }}{% endif %} {% if o.entry_model_label %}开仓: {{ o.entry_model_label }}{% elif intraday_discipline %}开仓: —{% else %}风格: {{ '波段单' if o.trade_style == 'swing' else '趋势单' }}{% endif %} 风险: {% 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 intraday_discipline %} {% elif 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 %}
张数 {% if o.order_amount is not none %}{{ '%.2f'|format(o.order_amount) }}{% else %}—{% endif %}
盈利金额
标记价 -
浮盈亏 -
交易所止盈止损
止损:加载中… {% if not intraday_discipline %} {% endif %}
止盈:加载中… {% if not intraday_discipline %} {% 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' %} {% elif page == 'options' %} {% include 'options_panel.html' %} {% elif page == 'options_review' %} {% include 'options_review_panel.html' %} {% elif page == 'hedge_plan' %} {% include 'hedge_plan_panel.html' %} {% endif %} {% if page == 'records' %} {% include 'records_panel.html' %} {% endif %} {% if page == 'env_config' %} {% include 'env_config_panel.html' %} {% endif %} {% if page == 'risk_policy' %} {% include 'risk_policy_panel.html' %} {% endif %} {% if page == 'system_guide' %} {% include 'system_guide_panel.html' %} {% endif %} {% if page == 'settings' %} {% include 'settings_panel.html' %} {% endif %} {% if page == 'stats' %}

数据统计

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