{% extends "base.html" %} {% block title %}对冲管理{% endblock %} {% block heading %}对冲管理{% endblock %} {% block breadcrumb %}振幅锁仓 · 仓位跟踪{% endblock %} {% block content %} {% set error = request.query_params.get('error', '') %} {% if error %}
{{ error }}
{% endif %} {# ═══════════════ 新建轮次 ═══════════════ #}
新建轮次
{% if not active_rounds %}

暂无活跃轮次

创建一轮新的交易,开始跟踪仓位和锁仓状态

{% endif %} {% for round in active_rounds %} {# ═══════════════ 轮次卡片 ═══════════════ #} {% set locks = round.total_locks %}
{# ── 轮次头部 ── #}
{{ round.contract_code }} {{ round.daily_hands }} 手/天 锁仓 {{ locks }}/{{ round.max_locks }} {% if locks >= round.max_locks %} ⚠ 熔断{% endif %}
{# ── 止盈阈值 ── #} {% if round.positions %} {% set th = round_thresholds.get(round.id, {}) %}
止盈阈值 {{ th.get('amp', 0) }} × {{ th.get('point_value', 0) }} × {{ th.get('daily_hands', 0) }} = {{ "%.0f"|format(th.get('threshold', 0)) }} 元 | 当前 A = {{ th.get('amp', 0) }} | 跳点价 {{ th.get('point_value', 0) }} 元/点 | 总手数 {{ round.daily_hands * round.positions|length }}
{% endif %} {# ── 添加仓位 ── #}
{# ── 仓位表格 ── #} {% if round.positions %}
{% for p in round.positions|reverse %} {% endfor %}
#开仓价A锁仓价手数已锁状态操作
{{ loop.index }} {{ p.open_price }} {{ p.amp_threshold }} {{ p.lock_price }} {{ p.hands }} {% if p.locked_count > 0 %} {{ p.locked_count }}/{{ p.hands }} {% else %} 0/{{ p.hands }} {% endif %} {% if p.locked_count >= p.hands %} 已全锁 {% elif p.locked_count > 0 %} 部分锁 {% else %} 活跃 {% endif %}
{% else %}
暂无仓位,请添加。
{% endif %}
{% endfor %} {% endblock %}