From 0c35e6ad1920677a31d29b2ddc0f78766ffb873d Mon Sep 17 00:00:00 2001 From: gcarq Date: Sat, 25 Nov 2017 03:28:52 +0100 Subject: [PATCH] minor changes --- freqtrade/analyze.py | 1 + freqtrade/optimize/hyperopt.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/freqtrade/analyze.py b/freqtrade/analyze.py index 8edf86340..d586077db 100644 --- a/freqtrade/analyze.py +++ b/freqtrade/analyze.py @@ -15,6 +15,7 @@ from freqtrade.vendor.qtpylib.indicators import awesome_oscillator, crossed_abov logger = logging.getLogger(__name__) + class SignalType(Enum): """ Enum to distinguish between buy and sell signals """ BUY = "buy" diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 1b7e9a225..36eb0d275 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -16,12 +16,15 @@ from freqtrade.exchange import Bittrex from freqtrade.optimize.backtesting import backtest from freqtrade.vendor.qtpylib.indicators import crossed_above +# Remove noisy log messages +logging.getLogger('hyperopt.mongoexp').setLevel(logging.WARNING) + logger = logging.getLogger(__name__) # set TARGET_TRADES to suit your number concurrent trades so its realistic to 20days of data TARGET_TRADES = 1100 -TOTAL_TRIES = 4 +TOTAL_TRIES = None _CURRENT_TRIES = 0 # Configuration and data used by hyperopt @@ -188,8 +191,8 @@ def start(args): ) if args.mongodb: - logger.info('Using mongodb.') - logger.info('Start scripts/start-mongodb.sh and start-hyperopt-worker.sh manually') + logger.info('Using mongodb ...') + logger.info('Start scripts/start-mongodb.sh and start-hyperopt-worker.sh manually!') db_name = 'freqtrade_hyperopt' trials = MongoTrials('mongo://127.0.0.1:1234/{}/jobs'.format(db_name), exp_key='exp1') @@ -197,9 +200,6 @@ def start(args): trials = Trials() best = fmin(fn=optimizer, space=SPACE, algo=tpe.suggest, max_evals=TOTAL_TRIES, trials=trials) - logger.info( - '\n==================== HYPEROPT BACKTESTING REPORT ==============================\n' - ) logger.info('Best parameters:\n%s', json.dumps(best, indent=4)) results = sorted(trials.results, key=itemgetter('loss')) logger.info('Best Result:\n%s', results[0]['result'])