refactor: improve naming to reflect method functionality

This commit is contained in:
Matthias
2026-05-17 20:13:42 +02:00
parent 03fac42047
commit 875daac375
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ class StrategyResolver(IResolver):
strategy: IStrategy = StrategyResolver._load_strategy(
strategy_name, config=config, extra_dir=config.get("strategy_path")
)
strategy.ft_load_params_from_file()
strategy.ft_set_special_params_from_file()
# Set attributes
# Check if we need to override configuration
# (Attribute name, default, subkey)
+3 -2
View File
@@ -51,9 +51,10 @@ class HyperStrategyMixin:
for par in self._ft_hyper_params[space].values():
yield par.name, par
def ft_load_params_from_file(self) -> None:
def ft_set_special_params_from_file(self) -> None:
"""
Load Parameters from parameter file
Sets special parameters (stoploss, roi, trailing, max_open_trades) from the
previously loaded file.
Should/must run before config values are loaded in strategy_resolver.
"""
if self._ft_params_from_file:
+1 -1
View File
@@ -531,7 +531,7 @@ def test_strategy_interface_versioning(dataframe_1m, default_conf):
assert "exit_long" in exitdf
def test_strategy_ft_load_params_from_file(mocker, default_conf):
def test_strategy_ft_set_special_params_from_file(mocker, default_conf):
default_conf.update({"strategy": "StrategyTestV2"})
del default_conf["max_open_trades"]
mocker.patch(