修改排版,加入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
+5 -2
View File
@@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)
# freqtrade trade -c ./user_data/Chan/config/ChanLun_BTC_30.json --strategy ChanLun_BTC --strategy-path ./user_data/Chan/strategies
# freqtrade backtesting -c ./user_data/Chan/config/ChanLun_BTC_30.json --strategy ChanLun_BTC --strategy-path ./user_data/Chan/strategies --timerange=20250901-
# freqtrade download-data -c ./user_data/Chan/config/ChanLun_BTC_30.json -t 1m --pairs BTC/USDT:USDT --timerange=20250405-
# freqtrade download-data -c ./user_data/Chan/config/ChanLun_BTC_30.json -t 1m 1m 1h 1d 1M --pairs BTC/USDT:USDT --timerange=20250405-
# freqtrade download-data -c ./user_data/Chan/config/ChanLun_BTC_30.json -t 1m 1h 1d 1M --pairs BTC/USDT --timerange=20170101-
# freqtrade hyperopt --hyperopt-loss SharpeHyperOptLossDaily --spaces roi --strategy ChanLun_BTC --strategy-path ./user_data/Chan/strategies -c ./user_data/Chan/config/ChanLun_BTC_30.json -e 200 --timerange=20250201-20250901
# freqtrade edge -c ./user_data/Chan/config/ChanLun_BTC_30.json --strategy ChanLun_BTC --strategy-path ./user_data/Chan/strategies --timerange 20250721-20250901
@@ -120,13 +120,16 @@ class ChanLun_BTC(IStrategy):
dataframe_1d = self.dp.get_pair_dataframe(pair=self.pair, timeframe='1d')
dataframe_1M = self.dp.get_pair_dataframe(pair=self.pair, timeframe='1M')
self.chan.init_dataframes(dataframe_m, dataframe_1h, dataframe_1d, dataframe_1M)
self.print_all_ema52()
self.print_all_current_klc()
def print_all_ema52(self):
for key, value in self.chan.get_ema52_dict().items():
print(key, value)
def print_all_ema24(self):
for key, value in self.chan.get_ema24_dict().items():
print(key, value)
def print_all_current_klc(self):
for key, value in self.chan.get_current_klc_dict().items():
print(key, value.to_string())
def add_indicators(self, df):
fast = 12
slow = 26