if a stoploss order exists, always allow canceling that

This commit is contained in:
Matthias 2023-02-28 20:39:17 +01:00
parent dd10dec73d
commit d1b2e38ae9

View File

@ -841,7 +841,7 @@ class FreqtradeBot(LoggingMixin):
def cancel_stoploss_on_exchange(self, trade: Trade) -> Trade:
# First cancelling stoploss on exchange ...
if self.strategy.order_types.get('stoploss_on_exchange') and trade.stoploss_order_id:
if trade.stoploss_order_id:
try:
logger.info(f"Canceling stoploss on exchange for {trade}")
co = self.exchange.cancel_stoploss_order_with_result(