From 8342923defb0da41051f8067edc1ad6b2aee3c3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Thu, 19 Dec 2024 15:43:14 -0300 Subject: [PATCH] autoswitch --- trader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trader.py b/trader.py index 61214af..4624874 100755 --- a/trader.py +++ b/trader.py @@ -385,7 +385,9 @@ class trader: self.status_dict["start_time"]=self.start_time self.status_dict["deal_start_time"]=self.deal_start_time self.status_dict["stop_when_profit"]=self.stop_when_profit - self.status_dict["autoswitch"]=self.config_dict["autoswitch"] + self.status_dict["autoswitch"]=False + if "autoswitch" in self.config_dict: + self.status_dict["autoswitch"]=self.config_dict["autoswitch"] except Exception as e: self.broker.logger.log_this(f"Can't update status dictionary. Exception: {e}",1,self.pair)