mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
test: improve tests for new builtin spaces
This commit is contained in:
@@ -569,6 +569,7 @@ def test_generate_optimizer(mocker, hyperopt_conf) -> None:
|
|||||||
"buy_rsi": 35,
|
"buy_rsi": 35,
|
||||||
"sell_minusdi": 0.02,
|
"sell_minusdi": 0.02,
|
||||||
"sell_rsi": 75,
|
"sell_rsi": 75,
|
||||||
|
"exit_rsi": 7,
|
||||||
"exitaaa": 7,
|
"exitaaa": 7,
|
||||||
"protection_cooldown_lookback": 20,
|
"protection_cooldown_lookback": 20,
|
||||||
"protection_enabled": True,
|
"protection_enabled": True,
|
||||||
@@ -598,9 +599,12 @@ def test_generate_optimizer(mocker, hyperopt_conf) -> None:
|
|||||||
"buy_plusdi": 0.02,
|
"buy_plusdi": 0.02,
|
||||||
"buy_rsi": 35,
|
"buy_rsi": 35,
|
||||||
},
|
},
|
||||||
"exit": {
|
"exitaspace": {
|
||||||
"exitaaa": 7,
|
"exitaaa": 7,
|
||||||
},
|
},
|
||||||
|
"exit": {
|
||||||
|
"exit_rsi": 7,
|
||||||
|
},
|
||||||
"roi": {"0": 0.12, "20.0": 0.02, "50.0": 0.01, "110.0": 0},
|
"roi": {"0": 0.12, "20.0": 0.02, "50.0": 0.01, "110.0": 0},
|
||||||
"protection": {
|
"protection": {
|
||||||
"protection_cooldown_lookback": 20,
|
"protection_cooldown_lookback": 20,
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class HyperoptableStrategy(StrategyTestV3):
|
|||||||
sell_minusdi = DecimalParameter(
|
sell_minusdi = DecimalParameter(
|
||||||
low=0, high=1, default=0.5001, decimals=3, space="sell", load=False
|
low=0, high=1, default=0.5001, decimals=3, space="sell", load=False
|
||||||
)
|
)
|
||||||
exitaaa = IntParameter(low=0, high=10, default=5, space="exit")
|
exitaaa = IntParameter(low=0, high=10, default=5, space="exitaspace")
|
||||||
|
|
||||||
|
exit_rsi = IntParameter(low=0, high=10, default=5)
|
||||||
protection_enabled = BooleanParameter(default=True)
|
protection_enabled = BooleanParameter(default=True)
|
||||||
protection_cooldown_lookback = IntParameter([0, 50], default=30)
|
protection_cooldown_lookback = IntParameter([0, 50], default=30)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user