diff --git a/freqtrade/templates/FreqaiExampleStrategy.py b/freqtrade/templates/FreqaiExampleStrategy.py index 1c70e6c3..132d77ce 100644 --- a/freqtrade/templates/FreqaiExampleStrategy.py +++ b/freqtrade/templates/FreqaiExampleStrategy.py @@ -112,8 +112,8 @@ class FreqaiExampleStrategy(IStrategy): dataframe["%-volatility"] = dataframe["close"].pct_change().rolling(20).std() # 单一回归目标 - # 移除对未来的数据依赖 - dataframe["&-buy_rsi"] = ta.RSI(dataframe, timeperiod=14) + # 移除对未来的数据依赖 + dataframe["&-buy_rsi"] = ta.RSI(dataframe, timeperiod=14) # 数据清理 for col in ["&-buy_rsi", "%-volatility"]: @@ -125,7 +125,7 @@ class FreqaiExampleStrategy(IStrategy): except Exception as e: logger.error(f"创建 FreqAI 目标失败:{str(e)}") raise - + logger.info(f"目标列预览:\n{dataframe[['&-buy_rsi']].head().to_string()}") return dataframe