mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-14 12:13:57 +00:00
chore: Remove protections from config logic
This commit is contained in:
parent
d6cc88fa99
commit
e3a6c71087
|
@ -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]:
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user