fix handling timeframes

This commit is contained in:
hroff-1902 2019-06-14 02:58:34 +03:00
parent 9657b1a17f
commit 04ea66c977
2 changed files with 5 additions and 5 deletions

View File

@ -484,7 +484,6 @@ class Arguments(object):
Default: %(default)s.', Default: %(default)s.',
choices=['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h', choices=['1m', '3m', '5m', '15m', '30m', '1h', '2h', '4h',
'6h', '8h', '12h', '1d', '3d', '1w'], '6h', '8h', '12h', '1d', '3d', '1w'],
default=['1m', '5m'],
nargs='+', nargs='+',
dest='timeframes', dest='timeframes',
) )

View File

@ -50,8 +50,10 @@ if args.config:
pairs = config['exchange']['pair_whitelist'] pairs = config['exchange']['pair_whitelist']
# Don't fail if ticker_interval is not in the configuration if config.get('ticker_interval'):
timeframes = [config.get('ticker_interval')] timeframes = args.timeframes or [config.get('ticker_interval')]
else:
timeframes = args.timeframes or ['1m', '5m']
else: else:
config = { config = {
@ -68,8 +70,7 @@ else:
} }
} }
} }
timeframes = args.timeframes or ['1m', '5m']
timeframes = args.timeframes
configuration._load_logging_config(config) configuration._load_logging_config(config)