From 31625befd132bc74fd61e3209d1112af523fbf94 Mon Sep 17 00:00:00 2001 From: Axel-CH Date: Sun, 23 Mar 2025 22:19:16 -0400 Subject: [PATCH] feat: trigger startup function only when the bot leave the stopped state --- freqtrade/worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/worker.py b/freqtrade/worker.py index 05ff8fdf2..5647ae114 100644 --- a/freqtrade/worker.py +++ b/freqtrade/worker.py @@ -96,7 +96,7 @@ class Worker: logger.info( f"Changing state{f' from {old_state.name}' if old_state else ''} to: {state.name}" ) - if state == State.RUNNING or state == State.PAUSED: + if old_state == State.STOPPED and (state == State.RUNNING or state == State.PAUSED): self.freqtrade.startup() if state == State.STOPPED: