Change some thing
This commit is contained in:
+11
-1
@@ -31,6 +31,7 @@ class ChanKLC():
|
||||
self.rsi = klu.rsi
|
||||
self.volume_ratio = klu.volume_ratio
|
||||
self.macdhist = 0
|
||||
self.strength_list = []
|
||||
def set_klc_fx_type(self, klc_fx_type):
|
||||
#print(self.start_time, klc_fx_type, self.get_feature_data()['klu_macd'], self.get_feature_data()['klu_macdhist'], self.get_feature_data()['klu_rsi'])
|
||||
self.klc_fx_type = klc_fx_type
|
||||
@@ -49,7 +50,16 @@ class ChanKLC():
|
||||
self.volume_ratio = self.volume_ratio / len(self.klus)
|
||||
self.volume = self.volume / len(self.klus)
|
||||
self.macdhist = self.macdhist / len(self.klus)
|
||||
|
||||
self.cal_self_strength()
|
||||
def cal_self_strength(self):
|
||||
strength = 0
|
||||
if self.klus:
|
||||
if len(self.klus) == 1:
|
||||
strength = 1
|
||||
else:
|
||||
if len(self.klus) > 1:
|
||||
strength = 0
|
||||
self.strength_list.append(strength)
|
||||
def set_next(self, klc):
|
||||
self.next = klc
|
||||
def set_pre(self, klc):
|
||||
|
||||
Reference in New Issue
Block a user