{% 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 latest = round.positions[-1] %}
止盈阈值 {{ round.daily_hands }} × {{ latest.amp_threshold }} = {{ round.daily_hands * latest.amp_threshold }} 点 | 当前 A = {{ latest.amp_threshold }} | 总手数 {{ round.daily_hands * round.positions|length }}
{% endif %} {# ── 添加仓位 ── #}
{# ── 仓位表格 ── #} {% if round.positions %}
{% for p in round.positions|reverse %} {% endfor %}
开仓价A锁仓价手数已锁状态操作
{{ 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 %}