From d6fe9f857346b2c02b00de2ccbc0949efc512b8d Mon Sep 17 00:00:00 2001 From: "zhangkun9038@dingtalk.com" Date: Mon, 28 Apr 2025 18:26:32 +0800 Subject: [PATCH] stable1 6 --- freqtrade/templates/FreqaiExampleStrategy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/templates/FreqaiExampleStrategy.py b/freqtrade/templates/FreqaiExampleStrategy.py index a50b6cd..68a0a61 100644 --- a/freqtrade/templates/FreqaiExampleStrategy.py +++ b/freqtrade/templates/FreqaiExampleStrategy.py @@ -352,7 +352,7 @@ class FreqaiExampleStrategy(IStrategy): # 如果 MACD 列存在,则添加 MACD 金叉条件 if "macd" in dataframe.columns and "macdsignal" in dataframe.columns: - enter_long_conditions.append((df["macd"] > dataframe["macdsignal"])) + enter_long_conditions.append((dataframe["macd"] > dataframe["macdsignal"])) # 确保模型预测为买入 enter_long_conditions.append((dataframe["do_predict"] == 1))