{% for s in strategy_trend_records %}
{% set snap = s.snapshot or {} %}
{% set dca = snap.dca_levels if snap.dca_levels is defined else [] %}
{% set pnl = s.pnl_amount if s.pnl_amount is not none else snap.pnl_amount %}
{% set sym = s.symbol or s.exchange_symbol or '—' %}
#{{ s.id }} {{ sym }}{{ '做多' if s.direction == 'long' else '做空' }}{{ s.result_label or '—' }}{% if pnl is not none %}{{ mf(pnl) }}U{% else %}—{% endif %}补仓 {{ s.summary_dca or '—' }}{{ (s.closed_at or '')[:16] }}
计划 ID
{{ s.source_id or '—' }}
开仓
{{ (s.opened_at or '')[:16] or '—' }}
结束
{{ (s.closed_at or '')[:16] or '—' }}
均价
{% if snap.avg_entry_price is not none %}{{ price_fmt(sym, snap.avg_entry_price) }}{% else %}—{% endif %}
止损
{% if snap.stop_loss is not none %}{{ price_fmt(sym, snap.stop_loss) }}{% else %}—{% endif %}
止盈
{% if snap.take_profit is not none %}{{ price_fmt(sym, snap.take_profit) }}{% else %}—{% endif %}
风险%
{{ snap.risk_percent if snap.risk_percent is defined else '—' }}
杠杆
{{ snap.leverage if snap.leverage is defined else '—' }}x
计划保证金
{% if snap.plan_margin_capital is not none %}{{ mf(snap.plan_margin_capital) }}U{% else %}—{% endif %}
{% if dca and dca|length %}
档位
触发价
张数
状态
{% for lv in dca %}
{{ lv.label or lv.leg_key }}
{% if lv.price is not none %}{{ price_fmt(sym, lv.price) }}{% else %}—{% endif %}
{% if lv.contracts is not none %}{{ lv.contracts }}{% else %}—{% endif %}
{{ lv.status_label or '—' }}
{% endfor %}
{% endif %}
{% else %}
暂无趋势回调结束记录
{% endfor %}
顺势加仓记录{{ strategy_roll_records|length }} 条
{% for s in strategy_roll_records %}
{% set snap = s.snapshot or {} %}
{% set group = snap.group if snap.group is defined else {} %}
{% set legs = snap.legs if snap.legs is defined else [] %}
{% set pnl = s.pnl_amount if s.pnl_amount is not none else snap.pnl_amount %}
{% set sym = s.symbol or s.exchange_symbol or '—' %}
#{{ s.id }} {{ sym }}{{ '做多' if s.direction == 'long' else '做空' }}{{ s.result_label or '—' }}{% if pnl is not none %}{{ mf(pnl) }}U{% else %}—{% endif %}成交 {{ s.summary_dca or '—' }}{{ (s.closed_at or '')[:16] }}
组 ID
{{ s.source_id or '—' }}
创建
{{ (s.opened_at or group.created_at or '')[:16] or '—' }}
结束
{{ (s.closed_at or '')[:16] or '—' }}
状态
{{ s.status_at_close or group.status or '—' }}
杠杆
{{ group.leverage if group.leverage is defined else '—' }}x
备注
{{ group.message if group.message is defined else '—' }}
{% if legs and legs|length %}
腿次
挂单价
张数
状态
{% for leg in legs %}
{{ leg.leg_index or loop.index }}
{% if leg.limit_price is not none %}{{ price_fmt(sym, leg.limit_price) }}{% else %}—{% endif %}
{% if leg.order_amount is not none %}{{ leg.order_amount }}{% else %}—{% endif %}