Don't handle stoploss if there is an open regular order
This commit is contained in:
parent
a83de241e4
commit
ea5ac1efb5
@ -689,8 +689,13 @@ class FreqtradeBot:
|
|||||||
self._notify_sell(trade, "stoploss")
|
self._notify_sell(trade, "stoploss")
|
||||||
return True
|
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 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
|
stoploss = self.edge.stoploss(pair=trade.pair) if self.edge else self.strategy.stoploss
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user