add bb bb
This commit is contained in:
+10
@@ -42,6 +42,7 @@ class ChanKLC():
|
||||
self.strength = klu.strength
|
||||
self.last_top_klc = None
|
||||
self.last_bottom_klc = None
|
||||
self.bb_out = False
|
||||
def set_last_top_klu(self, last_top_klc):
|
||||
self.last_top_klc = last_top_klc
|
||||
def set_last_bottom_klc(self, last_bottom_klc):
|
||||
@@ -58,6 +59,15 @@ class ChanKLC():
|
||||
self.cal_indicators()
|
||||
self.cal_shape_1()
|
||||
self.strength = self.cal_klc_strength()
|
||||
self.cal_bb_out()
|
||||
def cal_bb_out(self):
|
||||
for klu in self.klus:
|
||||
if self.high >= klu.bbup30 and klu.bbup30 > 0:
|
||||
self.bb_out = True
|
||||
break
|
||||
if self.low <= klu.bblow30 and klu.bblow30 > 0:
|
||||
self.bb_out = True
|
||||
break
|
||||
def cal_indicators(self):
|
||||
for index in range(1, len(self.klus)):
|
||||
self.volume += self.klus[index].volume
|
||||
|
||||
Reference in New Issue
Block a user