dry run condition when sell occurs

This commit is contained in:
misagh 2018-11-25 19:48:46 +01:00
parent 1810fc9efa
commit 1ad5ccdfb0

View File

@ -781,6 +781,10 @@ class FreqtradeBot(object):
sell_type = 'sell'
if sell_reason in (SellType.STOP_LOSS, SellType.TRAILING_STOP_LOSS):
sell_type = 'stoploss'
if self.config.get('dry_run', False) and sell_type == 'stoploss':
limit = trade.stop_loss
# Execute sell and update trade record
order_id = self.exchange.sell(pair=str(trade.pair),
ordertype=self.strategy.order_types[sell_type],