mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
test: add custom parameter to test strategy
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user