更新包含关系

This commit is contained in:
jackyu66git
2025-11-18 02:52:54 +08:00
parent d61cbbec21
commit 6383f19004
3 changed files with 17 additions and 10 deletions
+6 -3
View File
@@ -71,6 +71,9 @@ class ChanKLC():
self.end_time = klu.time
self.close = klu.close
for klu in self.klu_list:
if klu.exception:
self.exception = True
print(klu.time, "exception")
if klu.separate_div > 0:
self.separate_div = True
if klu.continue_div:
@@ -146,9 +149,9 @@ class ChanKLC():
def set_state(self, state):
self.state = state
def check_klu_included(self, klu):
if self.high >= klu.high-10:
if self.high >= klu.high:
# high大于,low小于,左包含
if self.low <= klu.low+10:
if self.low <= klu.low:
self.add_klu(klu=klu)
# gn>gn-1
if self.dir == Chan_KLINE_DIR.UP:
@@ -176,7 +179,7 @@ class ChanKLC():
return False
else:
# high小于,low大于,右包含
if self.low >= klu.low-10:
if self.low >= klu.low:
self.add_klu(klu=klu)
# gn>gn-1
if self.dir == Chan_KLINE_DIR.UP: