From 50f914d6d5d293db1d29861c3d8f80d41c87149e Mon Sep 17 00:00:00 2001 From: ABS <53243996+ABSllk@users.noreply.github.com> Date: Mon, 23 Feb 2026 10:34:41 +0800 Subject: [PATCH] fix: pass starting_balance to protection manager in backtest --- docs/includes/protections.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/includes/protections.md b/docs/includes/protections.md index 786879e15..f2cb32fc0 100644 --- a/docs/includes/protections.md +++ b/docs/includes/protections.md @@ -69,7 +69,7 @@ def protections(self): #### MaxDrawdown -`MaxDrawdown` supports 2 calculation modes within the `lookback_period` in minutes (or in candles when using `lookback_period_candles`): +The `MaxDrawdown` protection evaluates trades that closed within the current `lookback_period` (or `lookback_period_candles`). It supports 2 calculation modes: - `calculation_mode: "ratios"` (default): Legacy approximation based on cumulative profit ratios. - `calculation_mode: "equity"`: Standard peak-to-trough drawdown on the account equity curve, using starting balance and cumulative absolute profit. @@ -173,7 +173,8 @@ class AwesomeStrategy(IStrategy) "lookback_period_candles": 48, "trade_limit": 20, "stop_duration_candles": 4, - "max_allowed_drawdown": 0.2 + "max_allowed_drawdown": 0.2, + "calculation_mode": "equity" }, { "method": "StoplossGuard",