From 36f01dc8f0a8f9e5b9fc6a17c5cea649301606a7 Mon Sep 17 00:00:00 2001 From: hmo Date: Wed, 22 Jul 2026 00:39:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20save=5Fresult=E5=8C=BA=E9=97=B4=E5=86=99?= =?UTF-8?q?=E5=85=A5=E9=97=A8=E7=A6=81=E2=80=94=E2=80=94=E4=B8=8B=E6=B2=BF?= =?UTF-8?q?<=E4=B8=8A=E6=B2=BF<=E4=B8=8B=E6=B2=BFx3=EF=BC=8C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=95=B4=E4=BD=93=E8=B7=B3=E8=BF=87=EF=BC=88=E9=98=B2?= =?UTF-8?q?214.68~2.52=E8=A7=A3=E6=9E=90=E6=B1=A1=E6=9F=93=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/batch_reassess.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/deploy/profile-scripts/batch_reassess.py b/deploy/profile-scripts/batch_reassess.py index 1624247e..f25d6b65 100644 --- a/deploy/profile-scripts/batch_reassess.py +++ b/deploy/profile-scripts/batch_reassess.py @@ -342,12 +342,16 @@ def save_result(code, full_text, parsed): if parsed["signal"]: updates.append("timing_signal=?") params.append(parsed["signal"]) - if parsed["entry_low"] > 0: + # 区间写入门禁:上下沿都必须为正且 下沿<上沿<下沿x3,否则视为解析错误整体跳过 + # (防 214.68~2.52 类解析污染,与 GATE_ZONE_SANITY 同级防护) + _el, _eh = parsed["entry_low"], parsed["entry_high"] + if _el > 0 and _eh > _el and _eh < _el * 3: updates.append("entry_low=?") - params.append(parsed["entry_low"]) - if parsed["entry_high"] > 0: + params.append(_el) updates.append("entry_high=?") - params.append(parsed["entry_high"]) + params.append(_eh) + elif _el > 0 or _eh > 0: + print(f" ⚠️ 买入区解析异常({_el}~{_eh}),跳过区间写入(保留原值)", flush=True) if parsed["stop_loss"] > 0: updates.append("stop_loss=?") params.append(parsed["stop_loss"])