From f3de4fb7fc59cf703b0518121b0175b646804a23 Mon Sep 17 00:00:00 2001 From: hmo Date: Mon, 27 Jul 2026 10:29:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(authority):=20=E5=8D=96=E5=87=BA/=E6=AD=A2?= =?UTF-8?q?=E7=9B=88=E4=B9=9F=E5=8F=9720h=E6=9D=83=E5=A8=81=E4=BF=9D?= =?UTF-8?q?=E6=8A=A4(=E6=8A=80=E6=9C=AF=E8=B7=AF=E5=BE=84=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E9=99=8D=E7=BA=A7=E5=8D=96=E5=87=BA=E2=86=92=E6=8C=81?= =?UTF-8?q?=E6=9C=89)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 原代码只保护买入,价格监控每2分钟把12维的卖出信号写回持有 - 盯盘显示信号=持有但tag=current_recommend→自相矛盾 --- mofin_db.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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