修改排版,加入up,down,flat,unknown显示

This commit is contained in:
jackyu66git
2025-09-30 13:40:20 +08:00
parent 1507f9f929
commit 566055b045
7 changed files with 305 additions and 140 deletions
+7
View File
@@ -50,6 +50,13 @@ class ChanKLC():
self.trend = Chan_PRICE_TREND.UNKNOWN
def set_trend(self, trend):
self.trend = trend
def to_string(self):
out = ""
start = self.start_time if self.start_time is not None else ""
end = self.end_time if self.end_time is not None else ""
price_diff = getattr(self, 'price_diff', None)
out += str(start) + " " + str(end) + " " + str(self.close) + " " + str(self.ema24) + " " + str(self.ema52) + " " + str(self.trend) + " " + str(self.close - self.ema52)
return out
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