chore: Remove protections from config logic

This commit is contained in:
Matthias 2024-09-29 09:41:02 +02:00
parent d6cc88fa99
commit e3a6c71087
3 changed files with 0 additions and 6 deletions

View File

@ -273,10 +273,6 @@ class Backtesting:
def _load_protections(self, strategy: IStrategy):
if self.config.get("enable_protections", False):
conf = self.config
if hasattr(strategy, "protections"):
conf = deepcopy(conf)
conf["protections"] = strategy.protections
self.protections = ProtectionManager(self.config, strategy.protections)
def load_bt_data(self) -> Tuple[Dict[str, DataFrame], TimeRange]:

View File

@ -69,7 +69,6 @@ class StrategyResolver(IResolver):
("order_time_in_force", None),
("stake_currency", None),
("stake_amount", None),
("protections", None),
("startup_candle_count", None),
("unfilledtimeout", None),
("use_exit_signal", True),

View File

@ -77,7 +77,6 @@ def __run_backtest_bg(btconfig: Config):
lastconfig["timerange"] = btconfig["timerange"]
lastconfig["timeframe"] = strat.timeframe
lastconfig["protections"] = btconfig.get("protections", [])
lastconfig["enable_protections"] = btconfig.get("enable_protections")
lastconfig["dry_run_wallet"] = btconfig.get("dry_run_wallet")