From a16328f3727681d874f9237d267987de24b1a9a3 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 1 Nov 2021 13:39:25 +0100 Subject: [PATCH] Don't force timeframe in config in config generator --- freqtrade/commands/build_config_commands.py | 8 ++++++++ freqtrade/templates/base_config.json.j2 | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/freqtrade/commands/build_config_commands.py b/freqtrade/commands/build_config_commands.py index 34ae35aff..ad38d2291 100644 --- a/freqtrade/commands/build_config_commands.py +++ b/freqtrade/commands/build_config_commands.py @@ -83,11 +83,19 @@ def ask_user_config() -> Dict[str, Any]: if val == UNLIMITED_STAKE_AMOUNT else val }, + { + "type": "select", + "name": "timeframe_in_config", + "message": "Tim", + "choices": ["Have the strategy define timeframe.", "Override in configuration."] + }, { "type": "text", "name": "timeframe", "message": "Please insert your desired timeframe (e.g. 5m):", "default": "5m", + "when": lambda x: x["timeframe_in_config"] == 'Override in configuration.' + }, { "type": "text", diff --git a/freqtrade/templates/base_config.json.j2 b/freqtrade/templates/base_config.json.j2 index 68eebdbd4..e2fa1c63e 100644 --- a/freqtrade/templates/base_config.json.j2 +++ b/freqtrade/templates/base_config.json.j2 @@ -10,8 +10,7 @@ "stake_currency": "{{ stake_currency }}", "stake_amount": {{ stake_amount }}, "tradable_balance_ratio": 0.99, - "fiat_display_currency": "{{ fiat_display_currency }}", - "timeframe": "{{ timeframe }}", + "fiat_display_currency": "{{ fiat_display_currency }}",{{ ('\n "timeframe": "' + timeframe + '",') if timeframe else '' }} "dry_run": {{ dry_run | lower }}, "cancel_open_orders_on_exit": false, "unfilledtimeout": {