更新包含关系
This commit is contained in:
+6
-3
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user