From 73eaf0f19a63f94ce54583c8cca4df56731ab719 Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Mon, 2 Feb 2026 13:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=AF=8F=E5=88=86=E9=92=9F?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B8=80=E6=AC=A1=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- strategies/ChanLun_EMA52.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/strategies/ChanLun_EMA52.py b/strategies/ChanLun_EMA52.py index d4070c8..40056fd 100644 --- a/strategies/ChanLun_EMA52.py +++ b/strategies/ChanLun_EMA52.py @@ -102,12 +102,13 @@ class ChanLun_EMA52(IStrategy): (self.pair, "1w"), ] def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: - self.init_dataframes(dataframe) dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14) - last_price = dataframe.iloc[-1]['close'] - tf_ema52_list = self.chan.check_price_ema52(last_price) if self.last_time + timedelta(minutes=1) < datetime.now(): - logger.info(tf_ema52_list) + logger.info("init_dataframes----------------------------") + last_price = dataframe.iloc[-1]['close'] + tf_ema52_list = self.chan.check_price_ema52(last_price) + self.init_dataframes(dataframe) + logger.info("Price_ema52_list: " + str(tf_ema52_list)) self.last_time = datetime.now() return dataframe def init_dataframes(self, dataframe_1m):