Merge pull request #6558 from samgermain/recursive-strategy-folder

Recursively search subdirectories in config['user_data_dir']/strategies for a strategy
This commit is contained in:
Matthias
2022-04-23 14:23:53 +02:00
committed by GitHub
11 changed files with 76 additions and 18 deletions

View File

@@ -41,7 +41,8 @@ class HyperoptTools():
"""
from freqtrade.resolvers.strategy_resolver import StrategyResolver
directory = Path(config.get('strategy_path', config['user_data_dir'] / USERPATH_STRATEGIES))
strategy_objs = StrategyResolver.search_all_objects(directory, False)
strategy_objs = StrategyResolver.search_all_objects(
directory, False, config.get('recursive_strategy_search', False))
strategies = [s for s in strategy_objs if s['name'] == strategy_name]
if strategies:
strategy = strategies[0]