Merge pull request #5205 from barisengez/develop

Added timerange and max open trades info above multiple strategy backtest result summary table
This commit is contained in:
Matthias 2021-06-29 16:49:17 +02:00 committed by GitHub
commit af04c8e2da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -663,6 +663,8 @@ def show_backtest_results(config: Dict, backtest_stats: Dict):
# Print Strategy summary table # Print Strategy summary table
table = text_table_strategy(backtest_stats['strategy_comparison'], stake_currency) table = text_table_strategy(backtest_stats['strategy_comparison'], stake_currency)
print(f"{results['backtest_start']} -> {results['backtest_end']} |"
f" Max open trades : {results['max_open_trades']}")
print(' STRATEGY SUMMARY '.center(len(table.splitlines()[0]), '=')) print(' STRATEGY SUMMARY '.center(len(table.splitlines()[0]), '='))
print(table) print(table)
print('=' * len(table.splitlines()[0])) print('=' * len(table.splitlines()[0]))

View File

@ -993,4 +993,5 @@ def test_backtest_start_multi_strat_nomock(default_conf, mocker, caplog, testdat
assert 'BACKTESTING REPORT' in captured.out assert 'BACKTESTING REPORT' in captured.out
assert 'SELL REASON STATS' in captured.out assert 'SELL REASON STATS' in captured.out
assert 'LEFT OPEN TRADES REPORT' in captured.out assert 'LEFT OPEN TRADES REPORT' in captured.out
assert '2017-11-14 21:17:00 -> 2017-11-14 22:58:00 | Max open trades : 1' in captured.out
assert 'STRATEGY SUMMARY' in captured.out assert 'STRATEGY SUMMARY' in captured.out