From ea5ac1efb531058cf4ed67ba4fccd4306cad8af5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 23 Jan 2020 20:24:23 +0100 Subject: [PATCH] Don't handle stoploss if there is an open regular order --- freqtrade/freqtradebot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 5505005ff..c150d1aa9 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -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