]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
fix(qav3): pivot confirmation logic at labeling
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 31 Jul 2025 16:22:39 +0000 (18:22 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Thu, 31 Jul 2025 16:22:39 +0000 (18:22 +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 854c6831fa213b37f38ab512c95ef49316f60dd5..097f78b3ed593e2f056843e5dc67d345ab5dc88e 100644 (file)
@@ -51,7 +51,7 @@ class QuickAdapterRegressorV3(BaseRegressionModel):
     https://github.com/sponsors/robcaulk
     """
 
-    version = "3.7.106"
+    version = "3.7.107"
 
     @cached_property
     def _optuna_config(self) -> dict[str, Any]:
@@ -1544,14 +1544,14 @@ def zigzag(
 
     def calculate_slopes_ok_threshold(
         pos: int,
-        min_threshold: float = 0.85,
+        min_threshold: float = 0.75,
         max_threshold: float = 0.95,
     ) -> float:
         volatility_quantile = calculate_volatility_quantile(pos)
         if np.isnan(volatility_quantile):
             return median([min_threshold, max_threshold])
 
-        return min_threshold + (max_threshold - min_threshold) * volatility_quantile
+        return max_threshold - (max_threshold - min_threshold) * volatility_quantile
 
     def update_candidate_pivot(pos: int, value: float):
         nonlocal candidate_pivot_pos, candidate_pivot_value
index cf24213c4674e4c3dcb9264085249615a8054b19..1445896618c2383f9eccc56435467bd84e5ddf88 100644 (file)
@@ -65,7 +65,7 @@ class QuickAdapterV3(IStrategy):
     INTERFACE_VERSION = 3
 
     def version(self) -> str:
-        return "3.3.115"
+        return "3.3.116"
 
     timeframe = "5m"
 
@@ -965,7 +965,7 @@ class QuickAdapterV3(IStrategy):
         lower_bound = 0
         upper_bound = 0
         price_deviation = (last_candle_natr / 100.0) * self.get_entry_natr_ratio(
-            pair, 0.0025
+            pair, 0.00125
         )
         if side == "long":
             lower_bound = last_candle_low * (1 - price_deviation)
index 9d6bd972cce385fbbec329187eb9e42804cc7887..7c269559449610c2e79a304d6f929ba7b4f84e60 100644 (file)
@@ -451,14 +451,14 @@ def zigzag(
 
     def calculate_slopes_ok_threshold(
         pos: int,
-        min_threshold: float = 0.85,
+        min_threshold: float = 0.75,
         max_threshold: float = 0.95,
     ) -> float:
         volatility_quantile = calculate_volatility_quantile(pos)
         if np.isnan(volatility_quantile):
             return median([min_threshold, max_threshold])
 
-        return min_threshold + (max_threshold - min_threshold) * volatility_quantile
+        return max_threshold - (max_threshold - min_threshold) * volatility_quantile
 
     def update_candidate_pivot(pos: int, value: float):
         nonlocal candidate_pivot_pos, candidate_pivot_value