From 5c3a418e6564d92c83cf123f150a6a87bb2cd81f Mon Sep 17 00:00:00 2001 From: Bruno Gouvea Date: Mon, 7 Jun 2021 18:15:26 -0300 Subject: [PATCH] Adjusting drawdown column position. --- freqtrade/optimize/hyperopt_tools.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/freqtrade/optimize/hyperopt_tools.py b/freqtrade/optimize/hyperopt_tools.py index 29014277e..9d6248643 100644 --- a/freqtrade/optimize/hyperopt_tools.py +++ b/freqtrade/optimize/hyperopt_tools.py @@ -233,16 +233,15 @@ class HyperoptTools(): 'results_metrics.winsdrawslosses', 'results_metrics.profit_mean', 'results_metrics.profit_total_abs', 'results_metrics.profit_total', 'results_metrics.holding_avg', - 'loss', 'is_initial_point', 'is_best', 'results_metrics.max_drawdown', - 'results_metrics.max_drawdown_abs']] + 'results_metrics.max_drawdown', 'results_metrics.max_drawdown_abs', + 'loss', 'is_initial_point', 'is_best']] else: # Legacy mode trials = trials[['Best', 'current_epoch', 'results_metrics.trade_count', 'results_metrics.winsdrawslosses', 'results_metrics.avg_profit', 'results_metrics.total_profit', - 'results_metrics.profit', 'results_metrics.duration', - 'loss', 'is_initial_point', 'is_best', 'results_metrics.max_drawdown', - 'results_metrics.max_drawdown_abs']] + 'results_metrics.profit', 'results_metrics.duration', 'results_metrics.max_drawdown', + 'results_metrics.max_drawdown_abs', 'loss', 'is_initial_point', 'is_best']] trials.columns = ['Best', 'Epoch', 'Trades', ' Win Draw Loss', 'Avg profit', 'Total profit', 'Profit', 'Avg duration', 'Max Drawdown', 'max_drawdown_abs', @@ -268,6 +267,8 @@ class HyperoptTools(): lambda x: f'{x:,.5f}'.rjust(8, ' ') if x != 100000 else "N/A".rjust(8, ' ') ) + stake_currency = config['stake_currency'] + trials['Max Drawdown'] = trials.apply( lambda x: '{} {}'.format( round_coin_value(x['max_drawdown_abs'], stake_currency), @@ -278,7 +279,7 @@ class HyperoptTools(): ) trials = trials.drop(columns=['max_drawdown_abs']) - stake_currency = config['stake_currency'] + trials['Profit'] = trials.apply( lambda x: '{} {}'.format( round_coin_value(x['Total profit'], stake_currency),