From 5f8c3c242387463ff159ce963073eb3cde4f1917 Mon Sep 17 00:00:00 2001 From: MoonGem Date: Wed, 21 Mar 2018 23:31:54 -0500 Subject: [PATCH] Hyperopt Mongodb Patch --- freqtrade/arguments.py | 2 +- freqtrade/optimize/hyperopt.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/freqtrade/arguments.py b/freqtrade/arguments.py index c69135117..aba0f9ea2 100644 --- a/freqtrade/arguments.py +++ b/freqtrade/arguments.py @@ -200,7 +200,7 @@ class Arguments(object): # Add hyperopt subcommand hyperopt_cmd = subparsers.add_parser('hyperopt', help='hyperopt module') - hyperopt_cmd.set_defaults(func=hyperopt.start) + hyperopt_cmd.set_defaults(func=hyperopt.sta) self.optimizer_shared_options(hyperopt_cmd) self.hyperopt_options(hyperopt_cmd) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 7dcd46fd2..405635bf7 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -497,7 +497,7 @@ class Hyperopt(Backtesting): results.duration.mean(), ) - def start(self) -> None: + def sta(self) -> None: timerange = Arguments.parse_timerange(self.config.get('timerange')) data = load_data( datadir=self.config.get('datadir'), @@ -586,7 +586,7 @@ class Hyperopt(Backtesting): sys.exit(0) -def start(args: Namespace) -> None: +def sta(args: Namespace) -> None: """ Start Backtesting script :param args: Cli args from Arguments() @@ -612,5 +612,4 @@ def start(args: Namespace) -> None: config['exchange']['secret'] = '' # Initialize backtesting object - hyperopt = Hyperopt(config) - hyperopt.start() + Hyperopt(config).start()