list-strategies should find recursively as well

This commit is contained in:
Matthias
2022-04-23 09:11:50 +02:00
parent c6927a1501
commit ba92e09b7b
6 changed files with 20 additions and 9 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]