From: Jérôme Benoit Date: Tue, 25 Mar 2025 16:26:48 +0000 (+0100) Subject: fix(qav3): clipping is enough in FRAMA X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b562cc5abf03f388da9b59ab956d82383aec1807;p=freqai-strategies.git fix(qav3): clipping is enough in FRAMA Signed-off-by: Jérôme Benoit --- diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 7b48dd0..5b4a4d5 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -164,7 +164,7 @@ def _fractal_dimension(high: np.ndarray, low: np.ndarray, period: int) -> float: if (HL1 + HL2) == 0 or HL3 == 0: return 1.0 - D = (np.log(HL1 + HL2) - np.log(HL3)) / np.log(2) + 1 + D = (np.log(HL1 + HL2) - np.log(HL3)) / np.log(2) return np.clip(D, 1.0, 2.0)