From db9247e78ee33f14f46f3e3718fb27597a2797f7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 14 Aug 2023 14:54:11 +0200 Subject: [PATCH] prevent errors in custom stop from crashing the bot --- freqtrade/strategy/interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 94e204b54..eca3e3ede 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -1181,7 +1181,8 @@ class IStrategy(ABC, HyperStrategyMixin): bound = (low if trade.is_short else high) bound_profit = current_profit if not bound else trade.calc_profit_ratio(bound) if self.use_custom_stoploss and dir_correct: - stop_loss_value = strategy_safe_wrapper(self.custom_stoploss, default_retval=None + stop_loss_value = strategy_safe_wrapper(self.custom_stoploss, default_retval=None, + supress_error=True )(pair=trade.pair, trade=trade, current_time=current_time, current_rate=(bound or current_rate),