don't sell if buy is still active

This commit is contained in:
xmatthias
2018-06-22 20:10:05 +02:00
parent c413e94f83
commit 8a44dff595
7 changed files with 90 additions and 4 deletions

View File

@@ -172,6 +172,10 @@ class Analyze(object):
if the threshold is reached and updates the trade record.
:return: True if trade should be sold, False otherwise
"""
if buy and self.config.get('experimental', {}).get('ignore_roi_if_buy_signal', False):
logger.debug('Buy signal still active - not selling.')
return False
# Check if minimal roi has been reached and no longer in buy conditions (avoiding a fee)
if self.min_roi_reached(trade=trade, current_rate=rate, current_time=date):
logger.debug('Required profit reached. Selling..')