{% extends "base.html" %} {% load alpha_trigger_filters %} {% block title %}触发器详情 - AgomTradePro{% endblock %} {% block content %}

{{ trigger.asset_code }} {{ trigger.asset_name }}

{{ trigger.get_trigger_type_display }} - 创建于 {{ trigger.created_at|date:"Y-m-d H:i" }}

编辑 {% if trigger.status == "ACTIVE" %} {% elif trigger.status == "PAUSED" %} {% endif %}
{{ candidate_stats.total|default:0 }}
候选总数
{{ candidate_stats.watch|default:0 }}
观察中
{{ candidate_stats.candidate|default:0 }}
候选中
{{ candidate_stats.actionable|default:0 }}
可行动
基本信息 {{ trigger.get_status_display }}
触发器 ID
{{ trigger.trigger_id }}
资产代码
{{ trigger.asset_code }}
资产名称
{{ trigger.asset_name|default:"-" }}
资产类别
{{ trigger.asset_class }}
触发器类型
{{ trigger.get_trigger_type_display }}
方向
{{ trigger.get_direction_display }}
信号强度
{{ trigger.get_strength_display }}
置信度
{{ trigger.confidence|floatformat:0 }}%
过期时间
{% if trigger.expires_at %}{{ trigger.expires_at|date:"Y-m-d H:i" }}{% else %}永不过期{% endif %}
{% if trigger.thesis %}
投资论点
{{ trigger.thesis }}
{% endif %}
触发条件
{{ trigger.trigger_condition|pprint_json }}
证伪条件 {{ trigger.invalidation_conditions|length }} 条
{% if trigger.invalidation_conditions %}
{% for cond in trigger.invalidation_conditions %}
{{ cond.condition_type }} {% if cond.condition_type == "threshold_cross" %} 当 {{ cond.indicator_code }} {% if cond.cross_direction == "lt" %}<{% elif cond.cross_direction == "lte" %}≤{% elif cond.cross_direction == "gt" %}>{% elif cond.cross_direction == "gte" %}≥{% endif %} {{ cond.threshold_value }} {% elif cond.condition_type == "time_decay" %} 持仓超过 {{ cond.max_holding_days }} 天 {% elif cond.condition_type == "regime_mismatch" %} 当前 Regime 不是 {{ cond.required_regime }} {% else %} {{ cond }} {% endif %}
{% endfor %}
{% else %}
暂无证伪条件
{% endif %}
关联选项
关联 Regime
{{ trigger.related_regime|default:"-" }}
关联 Policy 档位
{{ trigger.related_policy_level|default:"-" }}
触发时间
{% if trigger.triggered_at %}{{ trigger.triggered_at|date:"Y-m-d H:i" }}{% else %}-{% endif %}
证伪时间
{% if trigger.invalidated_at %}{{ trigger.invalidated_at|date:"Y-m-d H:i" }}{% else %}-{% endif %}
相关候选 {{ candidates|length }} 个
{% if candidates %} {% for candidate in candidates %} {% endfor %}
候选 ID 资产 方向 强度 状态 创建时间
{{ candidate.candidate_id|slice:":12" }}... {{ candidate.asset_code }} {{ candidate.get_direction_display }} {{ candidate.get_strength_display }} {{ candidate.get_status_display }} {{ candidate.created_at|date:"m-d H:i" }}
{% else %}
暂无相关候选
{% endif %}
{% endblock %}