From 7e37fec704e66cf6dccfdd20221748004fc04e4d Mon Sep 17 00:00:00 2001 From: hmo Date: Fri, 14 Aug 2026 19:18:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20price=5Fmonitor=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E6=97=B6=E6=AE=B5=E5=8F=8C=E5=B8=82=E5=9C=BA=E2=80=94=E2=80=94?= =?UTF-8?q?=E6=94=B9=E7=94=A8is=5Ftrading=5Fnow(A=E8=82=A19:30-15:00/?= =?UTF-8?q?=E6=B8=AF=E8=82=A19:30-16:00),=E6=B8=AF=E8=82=A1=E6=8C=81?= =?UTF-8?q?=E4=BB=9315:00-16:00=E6=9C=80=E5=90=8E=E4=B8=80=E5=B0=8F?= =?UTF-8?q?=E6=97=B6=E7=A0=B4=E6=AD=A2=E6=8D=9F=E6=AD=A2=E7=9B=88=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E4=B8=8D=E5=86=8D=E6=BC=8F(A=E8=82=A1=E6=94=B6?= =?UTF-8?q?=E7=9B=98=E5=90=8E=E4=BB=B7=E6=A0=BC=E4=B8=8D=E5=8F=98=E4=B8=8D?= =?UTF-8?q?=E8=AF=AF=E6=8A=A5,=E9=9B=86=E5=90=88=E7=AB=9E=E4=BB=B7?= =?UTF-8?q?=E4=BF=9D=E6=8A=A4=E4=BF=9D=E7=95=99)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/price_monitor.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/profile-scripts/price_monitor.py b/deploy/profile-scripts/price_monitor.py index b283a9ae..633640eb 100644 --- a/deploy/profile-scripts/price_monitor.py +++ b/deploy/profile-scripts/price_monitor.py @@ -704,12 +704,12 @@ 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;非此时段(竞价/午休/盘后)跳过告警+重评。 + # 2026-08-11 修复:告警/重评只在连续竞价时段执行(避开集合竞价虚拟撮合价误报)。 + # 2026-08-14 港股接入:时段判断按市场——A股 9:30-11:30/13:00-15:00,港股 9:30-12:00/13:00-16:00。 + # 港股16:00收盘,15:00-16:00 仍需监控持仓(A股已收盘价格不变,不会误报)。 + from market_config import is_trading_now _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") + _trading = is_trading_now('a') or is_trading_now('hk') if not _trading: print(f"[时段] {_now_hm} 非连续竞价时段(集合竞价/午休/盘后),跳过告警与重评(价格已刷新)", flush=True) # 仍提交状态(防止告警标记滞留)