feat: add builtin spaces enter and exit

This commit is contained in:
Matthias
2025-11-06 20:30:04 +01:00
parent a3efba019f
commit 649aff8076
5 changed files with 20 additions and 6 deletions

View File

@@ -974,6 +974,16 @@ def test_auto_hyperopt_interface(default_conf):
match=r"'hello:world:22' is not a valid space\. Parameter: exit22_rsi\.",
):
detect_all_parameters(strategy.__class__)
del strategy.__class__.exit22_rsi
# Valid exit parameter
strategy.__class__.exit_rsi = IntParameter([0, 10], default=5)
strategy.__class__.enter_rsi = IntParameter([0, 10], default=5)
spaces = detect_all_parameters(strategy.__class__)
assert "exit" in spaces
assert "enter" in spaces
del strategy.__class__.exit_rsi
del strategy.__class__.enter_rsi
def test_auto_hyperopt_interface_loadparams(default_conf, mocker, caplog):