mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Removing unecessary buy condition when sell_profit_only
This commit is contained in:
parent
94172091ae
commit
0d04da3158
|
@ -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)
|
# Experimental: Check if the trade is profitable before selling it (avoid selling at loss)
|
||||||
if _CONF.get('experimental', {}).get('sell_profit_only', False):
|
if _CONF.get('experimental', {}).get('sell_profit_only', False):
|
||||||
logger.debug('Checking if trade is profitable ...')
|
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
|
return False
|
||||||
|
|
||||||
if sell and not buy and _CONF.get('experimental', {}).get('use_sell_signal', False):
|
if sell and not buy and _CONF.get('experimental', {}).get('use_sell_signal', False):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user