Lock pairs for stoploss_on_exchange fills too

This commit is contained in:
Matthias 2019-08-13 08:47:11 +02:00
parent 2961efdc18
commit 28e318b646

View File

@ -681,6 +681,9 @@ class FreqtradeBot(object):
if stoploss_order and stoploss_order['status'] == 'closed': if stoploss_order and stoploss_order['status'] == 'closed':
trade.sell_reason = SellType.STOPLOSS_ON_EXCHANGE.value trade.sell_reason = SellType.STOPLOSS_ON_EXCHANGE.value
trade.update(stoploss_order) trade.update(stoploss_order)
# Lock pair for one candle to prevent immediate rebuys
self.strategy.lock_pair(trade.pair,
timeframe_to_next_date(self.config['ticker_interval']))
self._notify_sell(trade) self._notify_sell(trade)
return True return True