From 0d04da3158d1b38acc44a55cf75140cc1cd854ba Mon Sep 17 00:00:00 2001 From: Jean-Baptiste LE STANG Date: Mon, 29 Jan 2018 13:33:49 +0100 Subject: [PATCH] Removing unecessary buy condition when sell_profit_only --- freqtrade/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/main.py b/freqtrade/main.py index c4b7e0361..6f7a67df2 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -321,7 +321,7 @@ def should_sell(trade: Trade, rate: float, date: datetime, buy: bool, sell: bool # Experimental: Check if the trade is profitable before selling it (avoid selling at loss) if _CONF.get('experimental', {}).get('sell_profit_only', False): logger.debug('Checking if trade is profitable ...') - if not buy and trade.calc_profit(rate=rate) <= 0: + if trade.calc_profit(rate=rate) <= 0: return False if sell and not buy and _CONF.get('experimental', {}).get('use_sell_signal', False):