Change some thing

This commit is contained in:
jackyu66git
2025-06-19 18:39:02 +08:00
parent da5eb8dc18
commit 6e1c335d28
8 changed files with 90 additions and 5 deletions
+11 -1
View File
@@ -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):