From 94d1248e21c54557ca0fefbd0db9873ffc089c04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 19 Mar 2025 15:06:24 +0100 Subject: [PATCH] fix(qav3): fix natr value check 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickadapter/user_data/strategies/QuickAdapterV3.py b/quickadapter/user_data/strategies/QuickAdapterV3.py index 46568ac..3e545e5 100644 --- a/quickadapter/user_data/strategies/QuickAdapterV3.py +++ b/quickadapter/user_data/strategies/QuickAdapterV3.py @@ -43,7 +43,7 @@ class QuickAdapterV3(IStrategy): INTERFACE_VERSION = 3 def version(self) -> str: - return "3.1.7" + return "3.1.8" timeframe = "5m" @@ -402,7 +402,7 @@ class QuickAdapterV3(IStrategy): def get_trade_stoploss_distance(self, df: DataFrame, trade: Trade) -> float: entry_natr = self.get_trade_entry_natr(df, trade) - if entry_natr is None or entry_natr <= 0: + if entry_natr is None: return 0.0 return trade.open_rate * entry_natr * self.trailing_stoploss_natr_ratio -- 2.43.0