Added max open trades to strategy summary first line

This commit is contained in:
barbarius
2021-06-28 17:05:12 +02:00
parent 2e5b719de8
commit a0f28f4a15
2 changed files with 4 additions and 6 deletions

View File

@@ -660,14 +660,12 @@ def show_backtest_results(config: Dict, backtest_stats: Dict):
show_backtest_result(strategy, results, stake_currency)
if len(backtest_stats['strategy']) > 1:
backtest_timerange = \
f"{next(iter(backtest_stats['strategy'].items()))[1]['backtest_start']} -> " \
f"{next(iter(backtest_stats['strategy'].items()))[1]['backtest_end']}"
# Print Strategy summary table
first_strat_stats = next(iter(backtest_stats['strategy'].items()))[1]
table = text_table_strategy(backtest_stats['strategy_comparison'], stake_currency)
print(backtest_timerange)
print(f"{first_strat_stats['backtest_start']} -> {first_strat_stats['backtest_end']} |"
f" Max open trades : {first_strat_stats['max_open_trades']}")
print(' STRATEGY SUMMARY '.center(len(table.splitlines()[0]), '='))
print(table)
print('=' * len(table.splitlines()[0]))