Add new arguments
This commit is contained in:
parent
e38e0e60e1
commit
e7d0439741
@ -142,6 +142,14 @@ class Arguments(object):
|
|||||||
action='store_true',
|
action='store_true',
|
||||||
dest='refresh_pairs',
|
dest='refresh_pairs',
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--strategy-list',
|
||||||
|
help='Provide a commaseparated list of strategies to backtest '
|
||||||
|
'Please note that ticker-interval needs to be set either in config '
|
||||||
|
'or via command line',
|
||||||
|
nargs='+',
|
||||||
|
dest='strategy_list',
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--export',
|
'--export',
|
||||||
help='export backtest results, argument are: trades\
|
help='export backtest results, argument are: trades\
|
||||||
|
@ -187,6 +187,14 @@ class Configuration(object):
|
|||||||
config.update({'refresh_pairs': True})
|
config.update({'refresh_pairs': True})
|
||||||
logger.info('Parameter -r/--refresh-pairs-cached detected ...')
|
logger.info('Parameter -r/--refresh-pairs-cached detected ...')
|
||||||
|
|
||||||
|
if 'strategy_list' in self.args and self.args.strategy_list:
|
||||||
|
config.update({'strategy_list': self.args.strategy_list})
|
||||||
|
logger.info('using strategy list of %s Strategies', len(self.args.strategy_list))
|
||||||
|
|
||||||
|
if 'ticker_interval' in self.args and self.args.ticker_interval:
|
||||||
|
config.update({'ticker_interval': self.args.ticker_interval})
|
||||||
|
logger.info('Overriding ticker interval with Command line argument')
|
||||||
|
|
||||||
# If --export is used we add it to the configuration
|
# If --export is used we add it to the configuration
|
||||||
if 'export' in self.args and self.args.export:
|
if 'export' in self.args and self.args.export:
|
||||||
config.update({'export': self.args.export})
|
config.update({'export': self.args.export})
|
||||||
|
Loading…
Reference in New Issue
Block a user