]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(qav3): clipping is enough in FRAMA
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 25 Mar 2025 16:26:48 +0000 (17:26 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 25 Mar 2025 16:26:48 +0000 (17:26 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/strategies/Utils.py

index 7b48dd05765285938bad859bd98bc04c21b23fb2..5b4a4d5a6ecb0913c4bdd2d8576998888db0bf07 100644 (file)
@@ -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)