From d8a6410fd145d38a01f40b5cbc3757f76db2ea2c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 23 Aug 2020 09:00:57 +0200 Subject: [PATCH] Fix small bug when using max-open-trades -1 in backtesting --- freqtrade/optimize/optimize_reports.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/optimize/optimize_reports.py b/freqtrade/optimize/optimize_reports.py index 94729b6a5..b5e5da4af 100644 --- a/freqtrade/optimize/optimize_reports.py +++ b/freqtrade/optimize/optimize_reports.py @@ -273,7 +273,8 @@ def generate_backtest_stats(config: Dict, btdata: Dict[str, DataFrame], 'pairlist': list(btdata.keys()), 'stake_amount': config['stake_amount'], 'stake_currency': config['stake_currency'], - 'max_open_trades': config['max_open_trades'], + 'max_open_trades': (config['max_open_trades'] + if config['max_open_trades'] != float('inf') else -1), 'timeframe': config['timeframe'], **daily_stats, }