From a52e5bf45f05a80daa65a5b6912df35763616bec Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 16 Mar 2025 19:44:57 +0100 Subject: [PATCH] fix(qav3): rely on custom stoploss for trailing stop MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- quickadapter/user_data/strategies/QuickAdapterV3.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index ff21717..f1f2735 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -43,12 +43,12 @@ class QuickAdapterV3(IStrategy): timeframe = "5m" stoploss = -0.02 + use_custom_stoploss = True # Trailing stop: - trailing_stop = True + trailing_stop = False trailing_stop_positive = 0.01 trailing_stop_positive_offset = 0.011 trailing_only_offset_is_reached = True - use_custom_stoploss = True @property def stoploss_natr_ratio(self) -> float: @@ -394,6 +394,10 @@ class QuickAdapterV3(IStrategy): current_profit: float, **kwargs, ) -> float | None: + # Trailing stoploss starts at 1% profit + if current_profit < 0.01: + return None + df, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe) if df.empty: -- 2.43.0