update columns from ORDERFLOW_ADDED_COLUMNS

This commit is contained in:
James Lin
2025-04-26 10:24:53 -04:00
parent 5ee7f8037d
commit 0a4f82bc22

View File

@@ -17,7 +17,7 @@ from sklearn.model_selection import train_test_split
from freqtrade.configuration import TimeRange from freqtrade.configuration import TimeRange
from freqtrade.constants import DOCS_LINK, Config from freqtrade.constants import DOCS_LINK, Config
from freqtrade.data.converter import reduce_dataframe_footprint from freqtrade.data.converter import ORDERFLOW_ADDED_COLUMNS, reduce_dataframe_footprint
from freqtrade.exceptions import OperationalException from freqtrade.exceptions import OperationalException
from freqtrade.exchange import timeframe_to_seconds from freqtrade.exchange import timeframe_to_seconds
from freqtrade.strategy import merge_informative_pair from freqtrade.strategy import merge_informative_pair
@@ -709,11 +709,7 @@ class FreqaiDataKitchen:
skip_columns = [ skip_columns = [
(f"{s}_{suffix}") for s in ["date", "open", "high", "low", "close", "volume"] (f"{s}_{suffix}") for s in ["date", "open", "high", "low", "close", "volume"]
] ]
for s in [ for s in ORDERFLOW_ADDED_COLUMNS:
'trades', 'orderflow', 'imbalances', 'stacked_imbalances_bid',
'stacked_imbalances_ask', 'max_delta', 'min_delta', 'bid', 'ask',
'delta', 'total_trades'
]:
if s in dataframe.columns and f"{s}_{suffix}" in dataframe.columns: if s in dataframe.columns and f"{s}_{suffix}" in dataframe.columns:
skip_columns.append(f"{s}_{suffix}") skip_columns.append(f"{s}_{suffix}")
dataframe = dataframe.drop(columns=skip_columns) dataframe = dataframe.drop(columns=skip_columns)