修正了刷新图表缩放和位置不变的bug

This commit is contained in:
jackyu66git
2026-04-16 02:31:48 +08:00
parent 7815eada00
commit 04d8f73b94
3 changed files with 112 additions and 41 deletions
-12
View File
@@ -96,7 +96,6 @@ class ChanKLU:
self.trend = trend
def set_separate_div(self, separate_div):
self.separate_div = separate_div
bb2633_status = self.check_bb2633()
if self.klc and self.klc.pre and self.klc.next:
fx = self.check_fx_dir(self.klc.pre, self.klc.next)
if fx == Chan_FX_TYPE.TOP:
@@ -109,17 +108,6 @@ class ChanKLU:
self.separate_div = separate_div
else:
self.separate_div = 0
if bb2633_status == 0:
self.separate_div = 0
def check_bb2633(self, threadhold=300):
#print(self.time, self.high, self.bb2633upper, self.low, self.bb2633lower)
if abs(self.high - self.bb2633upper) < threadhold:
#print(self.time, self.high, self.bb2633upper)
return 1
if abs(self.low - self.bb2633lower) < threadhold:
#print(self.time, self.low, self.bb2633lower)
return -1
return 0
def check_fx_dir(self, pre, next):
fx = Chan_FX_TYPE.UNKNOWN
if pre.klc_fx_type == Chan_KLC_FX.TOP1 or pre.klc_fx_type == Chan_KLC_FX.TOP2 or next.klc_fx_type == Chan_KLC_FX.TOP1 or next.klc_fx_type == Chan_KLC_FX.TOP2 or self.klc.klc_fx_type == Chan_KLC_FX.TOP1 or self.klc.klc_fx_type == Chan_KLC_FX.TOP2: