diff --git a/changelog.txt b/changelog.txt index 2d044b2..465e87f 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ 2026.06.04: . Proper tp_mode 2 fix . Minor fixes to string handling. +. Fix misplaced lock 2026.06.03: . Fixed tp mode 2 non-functional diff --git a/main.py b/main.py index 35baeee..dcc2c9c 100644 --- a/main.py +++ b/main.py @@ -262,7 +262,7 @@ def restart_pair_no_json(base: str, quote: str) -> int: except Exception as e: broker.logger.log_this(f"Error canceling old take profit order: {e}",2,symbol) - broker.logger.log_this(f"Cancelling old take safety orders",2,symbol) + broker.logger.log_this(f"Cancelling old safety orders",2,symbol) for item in instance.status.get_safety_orders(): try: broker.cancel_order(item["id"],item["symbol"]) @@ -273,9 +273,10 @@ def restart_pair_no_json(base: str, quote: str) -> int: running_traders.remove(instance) except ValueError: broker.logger.log_this(f"Instance {instance.status.get_pair()} not found in running_traders.",1,instance.status.get_pair()) - add_instance(base,quote) - return 0 - return 1 + else: + return 1 + add_instance(base,quote) + return 0 except Exception as e: broker.logger.log_this(f"Exception in restart_pair_no_json: {e}",1,symbol) return 1