diff --git a/static/instance_theme.css b/static/instance_theme.css
index 9dd5205..ed73ad6 100644
--- a/static/instance_theme.css
+++ b/static/instance_theme.css
@@ -835,3 +835,48 @@ html[data-theme="light"] .key-row-collapse .pos-side-badge[style*="2a3152"] {
color: #006e9a !important;
}
+html[data-theme="light"] .key-row-collapse.key-history-success {
+ background: rgba(8, 122, 80, 0.08) !important;
+ border-color: rgba(8, 122, 80, 0.35) !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-success .key-row-collapse-summary,
+html[data-theme="light"] .key-row-collapse.key-history-success .key-row-summary-title strong {
+ color: #142232 !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-success .key-history-brief,
+html[data-theme="light"] .key-row-collapse.key-history-success .key-history-outcome-badge {
+ color: #087a50 !important;
+ background: rgba(8, 122, 80, 0.1) !important;
+ border-color: rgba(8, 122, 80, 0.28) !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-manual {
+ background: #f0f2f6 !important;
+ border-color: #b8c0cc !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-manual .key-history-brief,
+html[data-theme="light"] .key-row-collapse.key-history-manual .key-history-outcome-badge {
+ color: #5a6478 !important;
+ background: rgba(90, 100, 120, 0.1) !important;
+ border-color: rgba(90, 100, 120, 0.22) !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-failed {
+ background: rgba(192, 48, 48, 0.06) !important;
+ border-color: rgba(192, 48, 48, 0.28) !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-failed .key-row-collapse-summary {
+ color: #1a2838 !important;
+}
+
+html[data-theme="light"] .key-row-collapse.key-history-failed .key-history-brief,
+html[data-theme="light"] .key-row-collapse.key-history-failed .key-history-outcome-badge {
+ color: #b04040 !important;
+ background: rgba(192, 48, 48, 0.08) !important;
+ border-color: rgba(192, 48, 48, 0.22) !important;
+}
+
diff --git a/strategy_templates/key_monitor_panel.html b/strategy_templates/key_monitor_panel.html
index bdadb90..0ad0cce 100644
--- a/strategy_templates/key_monitor_panel.html
+++ b/strategy_templates/key_monitor_panel.html
@@ -19,6 +19,16 @@
.key-row-collapse-body .pos-meta{margin-top:10px;margin-bottom:10px}
.key-row-collapse-body .pos-grid{margin-bottom:8px}
.key-history-alert{font-size:.75rem;color:#aab;margin-top:8px;margin-bottom:2px;padding-bottom:4px;white-space:pre-wrap;word-break:break-word;line-height:1.5}
+.key-history-outcome-badge{font-size:.7rem;font-weight:600;padding:1px 7px;border-radius:4px;line-height:1.35}
+.key-row-collapse.key-history-success{border-color:rgba(76,217,127,.42);background:rgba(18,32,26,.92)}
+.key-row-collapse.key-history-success .key-row-collapse-summary{color:#c8f0d6}
+.key-row-collapse.key-history-success .key-row-summary-title strong{color:#e8fff0}
+.key-row-collapse.key-history-success .key-history-brief,.key-row-collapse.key-history-success .key-history-outcome-badge{color:#4cd97f;background:rgba(76,217,127,.12);border:1px solid rgba(76,217,127,.28)}
+.key-row-collapse.key-history-manual{border-color:rgba(136,146,176,.45);background:rgba(22,24,32,.95)}
+.key-row-collapse.key-history-manual .key-history-brief,.key-row-collapse.key-history-manual .key-history-outcome-badge{color:#9aa8c4;background:rgba(136,146,176,.12);border:1px solid rgba(136,146,176,.28)}
+.key-row-collapse.key-history-failed{border-color:rgba(232,160,144,.4);background:rgba(36,22,24,.95)}
+.key-row-collapse.key-history-failed .key-row-collapse-summary{color:#e8cfc8}
+.key-row-collapse.key-history-failed .key-history-brief,.key-row-collapse.key-history-failed .key-history-outcome-badge{color:#e8a090;background:rgba(232,160,144,.1);border:1px solid rgba(232,160,144,.28)}
{% macro key_direction_label(k) -%}
@@ -35,8 +45,34 @@
{%- if k.breakeven_enabled %} · 保本开{% else %} · 保本关{% endif %}
{%- endmacro %}
+{% macro key_history_outcome_kind(h) -%}
+{%- set r = (h.close_reason or '')|trim -%}
+{%- if r in ['fib_filled', 'false_breakout_filled', 'key_level_alert_done', 'alerts_complete', 'auto_opened'] -%}success
+{%- elif r == 'manual' -%}manual
+{%- elif r -%}failed
+{%- else -%}neutral
+{%- endif -%}
+{%- endmacro %}
+
+{% macro key_history_outcome_label(h) -%}
+{%- set r = (h.close_reason or '')|trim -%}
+{%- if r == 'fib_filled' -%}斐波成交
+{%- elif r == 'false_breakout_filled' -%}假突破成交
+{%- elif r == 'key_level_alert_done' -%}提醒完成
+{%- elif r == 'alerts_complete' -%}提醒已满
+{%- elif r == 'auto_opened' -%}自动开仓
+{%- elif r == 'manual' -%}手动删除
+{%- elif r == 'fib_invalidate' -%}斐波失效
+{%- elif r == 'false_breakout_expired' -%}假突破过期
+{%- elif r == 'fib_plan_invalid' -%}计划无效
+{%- elif r == 'rr_insufficient' -%}盈亏比不足
+{%- elif r == 'exchange_failed' -%}下单失败
+{%- else -%}{{ r or '—' }}
+{%- endif -%}
+{%- endmacro %}
+
{% macro key_history_brief(h) -%}
-{{ h.close_reason or '—' }} · {{ (h.closed_at or '-')[:16] }} · 上{{ h.upper }} / 下{{ h.lower }} · 提醒 {{ h.notification_count or 0 }}
+{{ key_history_outcome_label(h) }} · {{ (h.closed_at or '-')[:16] }} · 上{{ h.upper }} / 下{{ h.lower }} · 提醒 {{ h.notification_count or 0 }}
{%- endmacro %}
@@ -133,13 +169,14 @@
失效或已结案的关键位 · 点击展开详情