Start to integration strategy

This commit is contained in:
Porter
2025-06-14 13:58:02 +08:00
parent 20a633910d
commit 11f9863e75
3 changed files with 162 additions and 32 deletions
+7 -2
View File
@@ -32,6 +32,7 @@ class ChanLun():
time30 = 30
time60 = 60
time4h = 240
last_peak = {'high': 0, 'low': float('inf')}
def create_all_data(self, dataframe, ticker_indicator):
all_data = dict()
all_data['1m'] = dataframe
@@ -156,8 +157,8 @@ class ChanLun():
else:
fx_list.append(0)
klc_strength_list.append(klc.cal_fx_strength(2))
if klc.klc_fx_type != Chan_KLC_FX.UNKNOWN and klc.cal_fx_strength() > 1:
print(klc.start_time, klc.end_time, klc.cal_fx_strength(), klc.klc_fx_type, fx_list[-1], klc_strength_list[-1])
#if klc.klc_fx_type != Chan_KLC_FX.UNKNOWN and klc.cal_fx_strength() > 1:
#print(klc.start_time, klc.end_time, klc.cal_fx_strength(), klc.klc_fx_type, fx_list[-1], klc_strength_list[-1])
else:
klc_strength_list.append(0)
fx_list.append(0)
@@ -305,6 +306,10 @@ class ChanLun():
c,
v
]
if h > self.last_peak['high']:
self.last_peak['high'] = h
if l < self.last_peak['low']:
self.last_peak['low'] = l
#klu = KLU(self.create_item_dict(item_data, GetColumnNameFromFieldList(fields)))
klu = ChanKLU(time_str, o, h, l, c, v)
klu.set_idx(i)