From 1292e08fe47ab5ae8455c24f70612708988bd46c Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Sat, 17 Apr 2021 11:26:03 +0300 Subject: [PATCH] Use strategy_safe_wrapper() when calling custom_sell(). --- 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 b0710e833..1a007da15 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -557,7 +557,8 @@ class IStrategy(ABC, HyperStrategyMixin): # sell_profit_only and profit doesn't reach the offset - ignore sell signal sell_signal = False elif ask_strategy.get('use_sell_signal', True): - sell = sell or self.custom_sell(trade.pair, trade, date, current_rate, current_profit) + sell = sell or strategy_safe_wrapper(self.custom_sell, default_retval=False)( + trade.pair, trade, date, current_rate, current_profit) sell_signal = sell and not buy # TODO: return here if sell-signal should be favored over ROI else: