{# Hub iframe tab fragment — shared via embed_templates #} {% 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 '') %}
当前区间暂无平仓数据
{% endif %}将先撤销该合约已有 TP/SL,再按下列价格重挂.
| 品种 | 下单类型 | 开仓类型 | 方向 | 成交 | 止损(开仓) | 止盈 | 基数 | 杠杆 | 持仓分钟 | 开仓时间(北京) | 平仓时间(北京) | 盈亏U | 结果 | 操作 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ r.symbol }} | {{ r.monitor_type }}{% if r.key_signal_type %} · {{ r.key_signal_type }}{% endif %} | {{ r.effective_entry_reason or '-' }} | {{ '做多' if r.direction == 'long' else '做空' }} | {{ price_fmt(r.symbol, r.trigger_price) }} | {% 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 %}{{ 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] }} | {% set pnl_val = (r.effective_pnl_amount or 0)|float %}{{ 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 or '-' }}{% endif %} |