change something

This commit is contained in:
jackyu66git
2025-04-27 18:37:50 +08:00
parent 88701608bd
commit fceb57d2b8
10 changed files with 285 additions and 162 deletions
+3
View File
@@ -18,6 +18,7 @@ class ChanKLU:
self.ma30 = 0
self.ma250 = 0
self.rsi = 0
self.volume_ratio = 0
def set_idx(self, idx):
self.idx = idx
self.index = idx
@@ -30,6 +31,7 @@ class ChanKLU:
self.ma30 = float(item['ma30']) if item['ma30'] else 0
self.ma250 = float(item['ma250']) if item['ma250'] else 0
self.rsi = float(item['rsi']) if item['rsi'] else 0
self.volume_ratio = float(item['volume_ratio']) if item['volume_ratio'] else 0
def get_feature_data(self):
features = dict()
features['klu_close'] = self.close
@@ -46,4 +48,5 @@ class ChanKLU:
features['klu_ma30'] = self.ma30
features['klu_ma250'] = self.ma250
features['klu_rsi'] = self.rsi
features['klu_volume_ratio'] = self.volume_ratio
return features