{# Copyright (c) 2025-2026 马建军. All rights reserved. 专有软件,详见 LICENSE.zh-CN.txt #} {% extends "base.html" %} {% block title %}策略交易 - 国内期货 · 交易复盘系统{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
规则说明

趋势回调

  • 填写品种、方向、周期、止损、补仓边界、止盈 → 预览计划 → 确认后市价开首仓
  • 须 CTP 已连接、交易时段内、账户风控允许开仓
  • 运行中:价格触及止盈 → 全部平仓结案;回落至网格档位 → 自动分档补仓
  • 可手动「结束计划」;记录归档至策略交易记录

顺势加仓(滚仓)

  • 固定金额(以损定仓)模式;移动保本持仓不可滚仓
  • 须「下单监控」有 active 持仓;与趋势回调互斥
  • 风险预算 = 系统设置固定金额;合并持仓打到新止损总亏损 ≤ B
  • 最多 3 腿(已成交);同一组最多 1 条 pending 监控腿
  • 止盈锁定首仓;突破由程序监控标记价穿越后市价加仓

趋势回调

{% if active_trend %}

运行中 #{{ active_trend.id }} · {{ active_trend.symbol_name or active_trend.symbol }} · {{ '做多' if active_trend.direction == 'long' else '做空' }} · {{ active_trend.period_label or '15分' }}

已开 {{ active_trend.lots_open or 0 }} / {{ active_trend.target_lots }} 手 · 止损 {{ active_trend.stop_loss }} · 止盈 {{ active_trend.take_profit }}

后台按档位自动补仓,触及止盈或手动结束。

{% else %}

设置止损/补仓边界/止盈 → 预览 → 确认执行首仓;后续自动分档加仓。

{% endif %}

顺势加仓(滚仓)

顺势加仓规则说明
  • 手动提交;须实盘已有同向持仓与 active 监控单
  • 计仓模式须为固定金额;移动保本不可滚仓
  • 做多/做空各最多 3 次滚仓(仅计已成交);止盈为首仓 TP 不变
  • 风险预算 B = 系统设置中的固定金额;打到新止损 S 时合并持仓总亏损 ≤ B
  • 突破:标记价穿越触发价后按当时持仓重算手数再市价加仓
  • pending 腿不可改,只能删除;手动平仓后滚仓组关闭
{% if not roll_allowed %}

当前为「{{ sizing_mode_label }}」模式,滚仓不可用。请在系统设置切换为固定金额

{% endif %} {% if monitors %}

风险预算(固定金额):{{ '%.0f'|format(fixed_amount) }} 元

{% if not trading_session %}

当前{{ session_clock.status_label or '休盘' }}:请选「突破加仓」填写突破价后预览并提交监控。

{% endif %}
{% else %}

暂无可用持仓监控

  1. 打开 持仓监控,连接 CTP
  2. 系统设置为固定金额,在「期货下单」开仓(勿开移动保本)
  3. 开仓成功后生成本页可选监控,即可滚仓
{% endif %}

活跃滚仓组

{% if roll_groups %}
{% for g in roll_groups %} {% endfor %}
ID品种方向腿数首仓手数当前总手数首仓TP当前SL当前均价止盈盈利(元)
#{{ g.id }} {{ g.symbol_name or g.symbol }} {{ '多' if g.direction == 'long' else '空' }} {{ g.leg_count or 0 }}/3 {{ g.first_lots if g.first_lots is not none else '—' }} {{ g.total_lots if g.total_lots is not none else '—' }} {{ g.initial_take_profit or '—' }} {{ g.current_stop_loss or '—' }} {{ g.avg_entry or '—' }} {{ g.reward_at_tp if g.reward_at_tp is not none else '—' }}
{% else %}

暂无

{% endif %}

正在滚仓

{% if roll_legs %}
{% for l in roll_legs %} {% endfor %}
#方式手数触发/限价新SL当前价状态操作
{{ l.id }} #{{ l.roll_group_id }} {{ add_mode_labels.get(l.add_mode, l.add_mode) }} {{ l.lots or '—' }} {{ l.breakthrough_price or l.limit_price or l.fill_price or '—' }} {{ l.new_stop_loss or '—' }} {{ l.current_price if l.current_price is not none else '—' }} {{ roll_leg_status_labels.get(l.status, l.status) }}{% if l.status == 'invalidated' and l.invalidated_reason %} · {{ l.invalidated_reason[:24] }}{% endif %} {% if l.status == 'pending' %}{% else %}—{% endif %}
{% else %}

暂无

{% endif %}

策略交易记录 →

{% endblock %} {% block extra_js %} {% endblock %}