test: add custom parameter to test strategy

This commit is contained in:
Matthias
2025-11-05 20:14:28 +01:00
parent 1a2f261ee2
commit d1b553cecc
2 changed files with 5 additions and 0 deletions

View File

@@ -569,6 +569,7 @@ def test_generate_optimizer(mocker, hyperopt_conf) -> None:
"buy_rsi": 35,
"sell_minusdi": 0.02,
"sell_rsi": 75,
"exitaaa": 7,
"protection_cooldown_lookback": 20,
"protection_enabled": True,
"roi_t1": 60.0,
@@ -597,6 +598,9 @@ def test_generate_optimizer(mocker, hyperopt_conf) -> None:
"buy_plusdi": 0.02,
"buy_rsi": 35,
},
"exit": {
"exitaaa": 7,
},
"roi": {"0": 0.12, "20.0": 0.02, "50.0": 0.01, "110.0": 0},
"protection": {
"protection_cooldown_lookback": 20,

View File

@@ -35,6 +35,7 @@ class HyperoptableStrategy(StrategyTestV3):
sell_minusdi = DecimalParameter(
low=0, high=1, default=0.5001, decimals=3, space="sell", load=False
)
exitaaa = IntParameter(low=0, high=10, default=5, space="exit")
protection_enabled = BooleanParameter(default=True)
protection_cooldown_lookback = IntParameter([0, 50], default=30)