update exit_positions, add trade.has_open_position check before trade handling, update comment
This commit is contained in:
@@ -1279,8 +1279,8 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
logger.warning(
|
logger.warning(
|
||||||
f"Unable to handle stoploss on exchange for {trade.pair}: {exception}"
|
f"Unable to handle stoploss on exchange for {trade.pair}: {exception}"
|
||||||
)
|
)
|
||||||
# Check if we can sell our current pair
|
# Check if we can exit our current position for this trade
|
||||||
if trade.is_open and self.handle_trade(trade):
|
if trade.has_open_position and trade.is_open and self.handle_trade(trade):
|
||||||
trades_closed += 1
|
trades_closed += 1
|
||||||
|
|
||||||
except DependencyException as exception:
|
except DependencyException as exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user