From 3e8ea4c5187179bc2923c8aeeb662d3f3e88b819 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 17 Jun 2025 11:28:50 +0200 Subject: [PATCH] refactor(qav3): code cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../user_data/freqaimodels/QuickAdapterRegressorV3.py | 6 +++--- quickadapter/user_data/strategies/Utils.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py index a6b7c1b..5cde824 100644 --- a/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py +++ b/quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py @@ -1371,10 +1371,10 @@ def zigzag( pos - candidate_pivot_pos ) - if direction == TrendDirection.DOWN: - slope_ok_cache[cache_key] = log_slope_close < -min_slope - elif direction == TrendDirection.UP: + if direction == TrendDirection.UP: slope_ok_cache[cache_key] = log_slope_close > min_slope + elif direction == TrendDirection.DOWN: + slope_ok_cache[cache_key] = log_slope_close < -min_slope else: slope_ok_cache[cache_key] = False diff --git a/quickadapter/user_data/strategies/Utils.py b/quickadapter/user_data/strategies/Utils.py index 6543564..0afca65 100644 --- a/quickadapter/user_data/strategies/Utils.py +++ b/quickadapter/user_data/strategies/Utils.py @@ -500,10 +500,10 @@ def zigzag( pos - candidate_pivot_pos ) - if direction == TrendDirection.DOWN: - slope_ok_cache[cache_key] = log_slope_close < -min_slope - elif direction == TrendDirection.UP: + if direction == TrendDirection.UP: slope_ok_cache[cache_key] = log_slope_close > min_slope + elif direction == TrendDirection.DOWN: + slope_ok_cache[cache_key] = log_slope_close < -min_slope else: slope_ok_cache[cache_key] = False -- 2.43.0