mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
refactor: improve wording from category to space
This commit is contained in:
@@ -63,22 +63,22 @@ class HyperOptAuto(IHyperOpt):
|
|||||||
return default_func
|
return default_func
|
||||||
|
|
||||||
def get_indicator_space(
|
def get_indicator_space(
|
||||||
self, category: Literal["buy", "sell", "enter", "exit", "protection"] | str
|
self, space: Literal["buy", "sell", "enter", "exit", "protection"] | str
|
||||||
) -> list:
|
) -> list:
|
||||||
"""
|
"""
|
||||||
Get indicator space for a given space.
|
Get indicator space for a given space.
|
||||||
:param category: parameter space to get.
|
:param space: parameter space to get.
|
||||||
"""
|
"""
|
||||||
indicator_space = [
|
indicator_space = [
|
||||||
attr.get_space(attr_name)
|
attr.get_space(attr_name)
|
||||||
for attr_name, attr in self.strategy.enumerate_parameters(category)
|
for attr_name, attr in self.strategy.enumerate_parameters(space)
|
||||||
if attr.optimize
|
if attr.optimize
|
||||||
]
|
]
|
||||||
if len(indicator_space) > 0:
|
if len(indicator_space) > 0:
|
||||||
return indicator_space
|
return indicator_space
|
||||||
else:
|
else:
|
||||||
_format_exception_message(
|
_format_exception_message(
|
||||||
category, self.config.get("hyperopt_ignore_missing_space", False)
|
space, self.config.get("hyperopt_ignore_missing_space", False)
|
||||||
)
|
)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user