diff --git a/mofin_db.py b/mofin_db.py index 2a50f586..54eed404 100644 --- a/mofin_db.py +++ b/mofin_db.py @@ -1661,9 +1661,11 @@ def write_holding_strategy(conn, code: str, name: str, data: dict, pass # ── 信号权威层级(2026-07-22):新鲜(<20h)12维动作级信号, # 技术路径(regenerate_all/price_monitor)无权降级为 关注/信号不充分/持有。 - # 只有 LLM 路径(batch_12d/per_stock_12d)或风险信号(卖出/止盈)可以覆盖。── + # 只有 LLM 路径(batch_12d/per_stock_12d)可以覆盖。 + # 2026-07-27 老爸补:卖出/止盈的保护漏了(技术路径把卖出→持有导致盯盘显示矛盾)── _TECHNICAL_PATHS = ('write_holding_strategy',) - if source_trigger in _TECHNICAL_PATHS and _old_sig in ("买入", "可买入", "可加仓") \ + if source_trigger in _TECHNICAL_PATHS \ + and _old_sig in ("买入", "可买入", "可加仓", "卖出", "止盈") \ and _new_sig not in _ACTION_SIGNALS and _old_ra: try: from datetime import datetime as _ddt, timedelta as _dtd