mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Added max open trades to strategy summary first line
This commit is contained in:
parent
2e5b719de8
commit
a0f28f4a15
|
@ -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]))
|
||||
|
|
|
@ -993,5 +993,5 @@ def test_backtest_start_multi_strat_nomock(default_conf, mocker, caplog, testdat
|
|||
assert 'BACKTESTING REPORT' in captured.out
|
||||
assert 'SELL REASON STATS' in captured.out
|
||||
assert 'LEFT OPEN TRADES REPORT' in captured.out
|
||||
assert '2017-11-14 21:17:00 -> 2017-11-14 22:58:00' 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
|
||||
|
|
Loading…
Reference in New Issue
Block a user