From f6dba9a09801f58bab21299c23f49008137f9a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Sat, 1 Mar 2025 13:07:29 -0300 Subject: [PATCH] fixed missing programmed_stop flag toggle --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d9fd030..401dbd2 100644 --- a/main.py +++ b/main.py @@ -1665,7 +1665,7 @@ def unwrapped_last_call(base,quote): def unwrapped_deferred_last_call(base,quote,yyyymmdd): ''' - Programs the trader to not open new deals from a certain future date. Like a VCR. + Programs the trader to not open new deals from a certain future date. Parameters: base (str): The base currency of the pair. @@ -1686,6 +1686,7 @@ def unwrapped_deferred_last_call(base,quote,yyyymmdd): for x in running_instances: if f"{base}{quote}"==x.pair: x.config.set_programmed_stop_time(limit) + x.config.set_programmed_stop(True) #save config file to disk x.broker.rewrite_config_file() return jsonify({"Success": f"Trader scheduled to go offline when profit is reached after {limit}"})