From a5d24f14cb49e542ed427d388caa656458959610 Mon Sep 17 00:00:00 2001 From: ABS <53243996+ABSllk@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:34:59 +0800 Subject: [PATCH] docs: clarify MaxDrawdown calculation modes and update example --- freqtrade/optimize/backtesting.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 26fd3f454..bdfce6e42 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -1271,8 +1271,9 @@ class Backtesting: def run_protections(self, pair: str, current_time: datetime, side: LongShort): if self.enable_protections: - self.protections.stop_per_pair(pair, current_time, side) - self.protections.global_stop(current_time, side) + starting_balance = self.wallets.get_starting_balance() + self.protections.stop_per_pair(pair, current_time, side, starting_balance) + self.protections.global_stop(current_time, side, starting_balance) def manage_open_orders(self, trade: LocalTrade, current_time: datetime, row: tuple) -> bool: """