From b8f3f5e8d288188ae9af98f3d95e2995bbd291a3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 May 2025 20:28:10 +0200 Subject: [PATCH] fix: use month-start for the resample --- freqtrade/data/btanalysis/historic_precision.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/data/btanalysis/historic_precision.py b/freqtrade/data/btanalysis/historic_precision.py index 96d12ba68..c4d186924 100644 --- a/freqtrade/data/btanalysis/historic_precision.py +++ b/freqtrade/data/btanalysis/historic_precision.py @@ -19,7 +19,7 @@ def get_significant_digits_over_time(candles: DataFrame) -> Series: candles1 = candles.set_index("date", drop=True) # Group by month and calculate the average number of significant digits - monthly_count_avg1 = candles1["max_count"].resample("ME").max() + monthly_count_avg1 = candles1["max_count"].resample("MS").max() # monthly_open_count_avg # convert monthly_open_count_avg from 5.0 to 0.00001, 4.0 to 0.0001, ... monthly_open_count_avg = 1 / 10**monthly_count_avg1