Merge pull request #2390 from freqtrade/remove_hardcoded_default

exportfilename should respect configured user_data_dir
This commit is contained in:
hroff-1902
2019-10-19 22:18:08 +03:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -192,6 +192,13 @@ class Configuration:
config.update({'datadir': create_datadir(config, self.args.get("datadir", None))})
logger.info('Using data directory: %s ...', config.get('datadir'))
if self.args.get('exportfilename'):
self._args_to_config(config, argname='exportfilename',
logstring='Storing backtest results to {} ...')
else:
config['exportfilename'] = (config['user_data_dir']
/ 'backtest_results/backtest-result.json')
def _process_optimize_options(self, config: Dict[str, Any]) -> None:
# This will override the strategy configuration
@@ -235,9 +242,6 @@ class Configuration:
self._args_to_config(config, argname='export',
logstring='Parameter --export detected: {} ...')
self._args_to_config(config, argname='exportfilename',
logstring='Storing backtest results to {} ...')
# Edge section:
if 'stoploss_range' in self.args and self.args["stoploss_range"]:
txt_range = eval(self.args["stoploss_range"])