feat: allow init of random spaces

This commit is contained in:
Matthias
2025-11-01 16:12:28 +01:00
parent ffab6c3c50
commit c88a92b4f9

View File

@@ -222,7 +222,12 @@ class HyperOptimizer:
"""
Assign the dimensions in the hyperoptimization space.
"""
for space in ["buy", "sell", "protection", "roi", "stoploss", "trailing", "trades"]:
spaces = ["buy", "sell", "protection", "roi", "stoploss", "trailing", "trades"]
spaces += [
s for s in self.config["spaces"] if s not in spaces and s not in ("all", "default")
]
for space in spaces:
if not HyperoptTools.has_space(self.config, space):
continue
logger.debug(f"Hyperopt has '{space}' space")