From be1426a5f6eea08a52de5f816e90f8ae6d7cc497 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 10 Nov 2024 09:18:42 +0100 Subject: [PATCH] feat: create strategy-dir if it doesn't exist --- freqtrade/commands/deploy_commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freqtrade/commands/deploy_commands.py b/freqtrade/commands/deploy_commands.py index 11e96a2ac..acd975b9b 100644 --- a/freqtrade/commands/deploy_commands.py +++ b/freqtrade/commands/deploy_commands.py @@ -90,6 +90,9 @@ def start_new_strategy(args: dict[str, Any]) -> None: strategy_dir = Path(args["strategy_path"]) else: strategy_dir = config["user_data_dir"] / USERPATH_STRATEGIES + if not strategy_dir.is_dir(): + logger.info(f"Creating strategy directory {strategy_dir}") + strategy_dir.mkdir(parents=True) new_path = strategy_dir / (args["strategy"] + ".py") if new_path.exists():