Allow hyperopting on strategies

This commit is contained in:
hroff-1902 2019-09-06 22:26:45 +03:00
parent 4fdf8a75cd
commit 4277062314
2 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,9 @@ class IHyperOpt(ABC):
"""
ticker_interval: str
def __init__(self, config: dict = None) -> None:
self.config = config
@staticmethod
@abstractmethod
def populate_indicators(dataframe: DataFrame, metadata: dict) -> DataFrame:

View File

@ -65,7 +65,7 @@ class HyperOptResolver(IResolver):
abs_paths.insert(0, Path(extra_dir).resolve())
hyperopt = self._load_object(paths=abs_paths, object_type=IHyperOpt,
object_name=hyperopt_name)
object_name=hyperopt_name, kwargs={'config': config})
if hyperopt:
return hyperopt
raise OperationalException(