From 47e1d209dbe3dffcab1a39fdd52bda20560f6c14 Mon Sep 17 00:00:00 2001 From: viotemp1 Date: Thu, 8 May 2025 05:49:34 +0300 Subject: [PATCH] round to decimals low and high --- freqtrade/optimize/space/decimalspace.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/freqtrade/optimize/space/decimalspace.py b/freqtrade/optimize/space/decimalspace.py index ef6945e24..ff0e0190d 100644 --- a/freqtrade/optimize/space/decimalspace.py +++ b/freqtrade/optimize/space/decimalspace.py @@ -1,5 +1,3 @@ -from math import log10 - from optuna.distributions import FloatDistribution @@ -22,7 +20,7 @@ class SKDecimal(FloatDistribution): self.name = name super().__init__( - low=round(low, int(log10(1 / self.step))) if self.step < 1 else low, - high=round(high, int(log10(1 / self.step))) if self.step < 1 else high, + low=round(low, decimals) if decimals else low, + high=round(high, decimals) if decimals else high, step=self.step, )