Only use exit_tag if exit_type i exit_signal

closes #7027
This commit is contained in:
Matthias 2022-07-03 11:07:05 +02:00
parent 906c7b92fe
commit f2fdc21374

View File

@ -1125,9 +1125,10 @@ class FreqtradeBot(LoggingMixin):
) )
for should_exit in exits: for should_exit in exits:
if should_exit.exit_flag: if should_exit.exit_flag:
exit_tag1 = exit_tag if should_exit.exit_type == ExitType.EXIT_SIGNAL else None
logger.info(f'Exit for {trade.pair} detected. Reason: {should_exit.exit_type}' logger.info(f'Exit for {trade.pair} detected. Reason: {should_exit.exit_type}'
f'{f" Tag: {exit_tag}" if exit_tag is not None else ""}') f'{f" Tag: {exit_tag1}" if exit_tag1 is not None else ""}')
exited = self.execute_trade_exit(trade, exit_rate, should_exit, exit_tag=exit_tag) exited = self.execute_trade_exit(trade, exit_rate, should_exit, exit_tag=exit_tag1)
if exited: if exited:
return True return True
return False return False