From 47451dd9895b38d61aeb35ac60b003ec308c1fa1 Mon Sep 17 00:00:00 2001 From: mrpabloyeah Date: Thu, 13 Nov 2025 20:14:39 +0100 Subject: [PATCH] Fix high_value calculation in calculate_max_drawdown() --- freqtrade/data/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/data/metrics.py b/freqtrade/data/metrics.py index 7e0b279f4..557d0ddcc 100644 --- a/freqtrade/data/metrics.py +++ b/freqtrade/data/metrics.py @@ -225,7 +225,7 @@ def calculate_max_drawdown( high_idx = max_drawdown_df.iloc[: idxmin + 1]["high_value"].idxmax() high_date = profit_results.loc[high_idx, date_col] low_date = profit_results.loc[idxmin, date_col] - high_val = max_drawdown_df.loc[high_idx, "cumulative"] + high_val = max_drawdown_df.loc[high_idx, "high_value"] low_val = max_drawdown_df.loc[idxmin, "cumulative"] max_drawdown_rel = max_drawdown_df.loc[idxmin, "drawdown_relative"]