Don't handle stoploss if there is an open regular order

This commit is contained in:
Matthias 2020-01-23 20:24:23 +01:00
parent a83de241e4
commit ea5ac1efb5

View File

@ -689,8 +689,13 @@ class FreqtradeBot:
self._notify_sell(trade, "stoploss")
return True
if trade.open_order_id:
# Trade has an open Buy or Sell order, Stoploss-handling can't happen in this case
# as the Amount on the exchange is tied up in another trade.
return False
# If buy order is fulfilled but there is no stoploss, we add a stoploss on exchange
if (not trade.open_order_id and not stoploss_order):
if (not stoploss_order):
stoploss = self.edge.stoploss(pair=trade.pair) if self.edge else self.strategy.stoploss