From 425d513a37b05383b2d17353a6d10ee1c6d3d0bd Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Thu, 30 Apr 2026 15:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AC=94=E4=B8=AD=E6=9E=A2?= =?UTF-8?q?=E7=AC=AC=E4=B8=89=E7=B1=BB=E5=8D=96=E5=8D=96=E7=82=B9=E8=AF=86?= =?UTF-8?q?=E5=88=AB=EF=BC=8C=E8=AF=86=E5=88=AB=E5=A5=BD=E5=90=8E=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E5=AE=8C=E6=88=90=E7=AC=94=E4=B8=AD=E6=9E=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChanSEG.py | 8 +++++++- web/app.py | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChanSEG.py b/ChanSEG.py index ff775ed..86165ba 100644 --- a/ChanSEG.py +++ b/ChanSEG.py @@ -96,7 +96,10 @@ class ChanSEG(): if self.dir == Chan_SEG_DIR.UP: for index in range(1, len(self.bi_list)): bi = self.bi_list[index] + #print(bi.end_time, bi.next,"UP SEG BI ZS Index") if bi.next == None or bi.next.next == None: + if last_zs and (bi.low > last_zs.zg or bi.high < last_zs.zd): + last_zs.set_end_bi(last_zs.bi_list[-1], last_zs.bi_list[-1].sure_time) continue bi2 = bi.next bi3 = bi.next.next @@ -118,6 +121,7 @@ class ChanSEG(): else: if bi.index > last_zs.bi_list[-1].index and bi.dir == Chan_BI_DIR.DOWN and bi.is_sure: if bi.low > last_zs.zg or bi.high < last_zs.zd: + #print(bi.end_time, "UP SEG BI ZS End") last_zs.set_end_bi(last_zs.bi_list[-1], last_zs.bi_list[-1].sure_time) if bi3.is_sure and bi3.index <= self.bi_list[-1].index and bi.check_bi_zs_overlap() and bi.dir == Chan_BI_DIR.DOWN: zg = min(bi.high, bi2.high, bi3.high) @@ -137,12 +141,14 @@ class ChanSEG(): last_zs.add_bi(bi.pre) last_zs.add_bi(bi) if index == len(self.bi_list) - 1 and last_zs and not last_zs.is_sure: - #print(bi.start_time, "BI", last_zs.is_sure) + print(bi.start_time, "BI", last_zs.is_sure) last_zs.set_end_bi(last_zs.bi_list[-1], last_zs.bi_list[-1].sure_time) else: for index in range(1, len(self.bi_list)): bi = self.bi_list[index] if bi.next == None or bi.next.next == None: + if last_zs and (bi.low > last_zs.zg or bi.high < last_zs.zd): + last_zs.set_end_bi(last_zs.bi_list[-1], last_zs.bi_list[-1].sure_time) continue bi2 = bi.next bi3 = bi.next.next diff --git a/web/app.py b/web/app.py index c94ffff..c2a3c70 100644 --- a/web/app.py +++ b/web/app.py @@ -50,6 +50,8 @@ logger = logging.getLogger(__name__) DATA_SERVICE_URL = os.environ.get("DATA_SERVICE_URL", os.environ.get("DATASVC_URL", "http://127.0.0.1:9009")) #DATA_SERVICE_URL = os.environ.get("DATA_SERVICE_URL", os.environ.get("DATASVC_URL", "http://192.168.1.9:9009")) +#DATA_SERVICE_URL = os.environ.get("DATA_SERVICE_URL", os.environ.get("DATASVC_URL", "http://103.179.242.166")) + DEFAULT_TIMEFRAME_LABELS = OrderedDict([ ("1m", "1分钟"), ("3m", "3分钟"),