]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
perf(qav3): increase threshold to confirm labeled pivot
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 9 May 2025 10:50:47 +0000 (12:50 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 9 May 2025 10:50:47 +0000 (12:50 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/QuickAdapterV3.py
quickadapter/user_data/strategies/Utils.py

index af191a8e8515b295d60233e0ddfe935495f67b48..65b68457f9ee6143ca5346d4dc0d0cd8365b0a11 100644 (file)
@@ -45,7 +45,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
     https://github.com/sponsors/robcaulk
     """
 
-    version = "3.7.30"
+    version = "3.7.31"
 
     @cached_property
     def _optuna_config(self) -> dict:
@@ -925,19 +925,20 @@ def zigzag(
             elif direction == TrendDirection.UP:
                 slope_ok = next_slope > 0
 
+        thresholds_ratio = 0.175
         significant_move_away_ok = False
         if direction == TrendDirection.DOWN:
             if np.any(
                 next_lows
                 < highs[candidate_pivot_pos]
-                * (1 - thresholds[candidate_pivot_pos] * 0.15)
+                * (1 - thresholds[candidate_pivot_pos] * thresholds_ratio)
             ):
                 significant_move_away_ok = True
         elif direction == TrendDirection.UP:
             if np.any(
                 next_highs
                 > lows[candidate_pivot_pos]
-                * (1 + thresholds[candidate_pivot_pos] * 0.15)
+                * (1 + thresholds[candidate_pivot_pos] * thresholds_ratio)
             ):
                 significant_move_away_ok = True
 
index 36bcc89dbae108835d5748310e48b88ba777889d..c0723bb7778e1e21dc9df1446235bcf272777087 100644 (file)
@@ -58,7 +58,7 @@ class QuickAdapterV3(IStrategy):
     INTERFACE_VERSION = 3
 
     def version(self) -> str:
-        return "3.3.26"
+        return "3.3.27"
 
     timeframe = "5m"
 
index 8ab5cb2267e419376a857e48b534a7b8dba3b1ec..cda7e981dcb3a49b63ab7a7eb6448bfc2de12c17 100644 (file)
@@ -419,19 +419,20 @@ def zigzag(
             elif direction == TrendDirection.UP:
                 slope_ok = next_slope > 0
 
+        thresholds_ratio = 0.175
         significant_move_away_ok = False
         if direction == TrendDirection.DOWN:
             if np.any(
                 next_lows
                 < highs[candidate_pivot_pos]
-                * (1 - thresholds[candidate_pivot_pos] * 0.15)
+                * (1 - thresholds[candidate_pivot_pos] * thresholds_ratio)
             ):
                 significant_move_away_ok = True
         elif direction == TrendDirection.UP:
             if np.any(
                 next_highs
                 > lows[candidate_pivot_pos]
-                * (1 + thresholds[candidate_pivot_pos] * 0.15)
+                * (1 + thresholds[candidate_pivot_pos] * thresholds_ratio)
             ):
                 significant_move_away_ok = True