From 4e324cca8c4e05c9d936c8efa912c30b70240f1e Mon Sep 17 00:00:00 2001 From: hmo Date: Tue, 11 Aug 2026 09:40:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20price=5Fmonitor=20=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=8F=AA=E5=9C=A8=E8=BF=9E=E7=BB=AD=E7=AB=9E=E4=BB=B7=E6=97=B6?= =?UTF-8?q?=E6=AE=B5(9:30-11:30/13:00-15:00)=E8=A7=A6=E5=8F=91=E2=80=94?= =?UTF-8?q?=E2=80=949:17=E9=9B=86=E5=90=88=E7=AB=9E=E4=BB=B7=E8=AF=AF?= =?UTF-8?q?=E6=8A=A5688002=E6=9A=B4=E8=B7=8C=E6=A0=B9=E5=9B=A0=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D,=E7=AB=9E=E4=BB=B7=E6=9C=9F=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E4=B8=8D=E8=A7=A6=E5=8F=91=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/price_monitor.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deploy/profile-scripts/price_monitor.py b/deploy/profile-scripts/price_monitor.py index 40c9b7ae..6c896d7b 100644 --- a/deploy/profile-scripts/price_monitor.py +++ b/deploy/profile-scripts/price_monitor.py @@ -641,6 +641,19 @@ def run_once(round_label=""): outputs.append(f"📋 进区事件{len(_zone_entries)}只(仅记日志不推送): {'; '.join(_zone_entries[:5])}") # === 第三步:买入区偏离检测 + 自动重评 === + # 2026-08-11 修复:告警/重评只在 A股连续竞价时段执行。 + # 9:15-9:25 集合竞价,API 返回虚拟撮合价(非真实成交)——9:17 曾误报 + # 688002 暴跌-20%(竞价期 API 误返回 52周低 135.2),造成假告警。 + # 连续竞价 = 9:30-11:30 + 13:00-15:00;非此时段(竞价/午休/盘后)跳过告警+重评。 + _now_hm = datetime.now().strftime("%H:%M") + _trading = (_now_hm >= "09:30" and _now_hm <= "11:30") or (_now_hm >= "13:00" and _now_hm <= "15:00") + if not _trading: + print(f"[时段] {_now_hm} 非连续竞价时段(集合竞价/午休/盘后),跳过告警与重评(价格已刷新)", flush=True) + # 仍提交状态(防止告警标记滞留) + if state_updated: + save_state(state) + return + reassesed_codes = [] # 先做急跌检测(仅持仓,自选股不推送暴跌告警) holdings_codes = set()