A backtest or a live track record shows one order of trades. The same trades in a different order can produce a much deeper drawdown. This script measures how much deeper.

History from and to, magic number (-1 = all), symbol filter, number of simulations, method, starting balance (0 = estimated from the account), random seed, drawdown threshold, write HTML report, panel size.
The screenshot shows part of the HTML report produced by the same Monte Carlo class for the 818 trades of a Strategy Tester run of a simple demo EA (EURUSD H1, 2021-2025). That demo EA loses money, which shows the report also works as a warning.
Robustness Lab: Market regime indicator (bias-corrected Hurst, efficiency ratio, volatility)
Classifies the market as trend, mean-reversion or noise using three public measures: the Hurst exponent by rescaled range with small-sample bias correction, Kaufman's efficiency ratio and the percentile of the current ATR. A colour strip shows the regime bar by bar, and a panel shows the regime on M15, H1, H4 and D1 at the same time. Part of the free Robustness Lab set.
Robustness Lab: Seasonality heatmap with t-statistics (hour x weekday)
Shows how a symbol has behaved in every hour of every weekday, as a heatmap on the chart. Colour the cells by t-statistic, mean return, hit rate or average range. Cells that pass a significance threshold get a gold frame, and the panel tells you how many cells would pass that threshold by chance alone, so a single lucky hour is not mistaken for an edge. Hover any cell for its full numbers. Part of the free Robustness Lab set.
Robustness Lab: Optimisation robustness map with plateau score for the Strategy Tester
Draws a live heatmap of two optimised inputs while the Strategy Tester optimises your EA, and scores every cell by its neighbourhood: the plateau score is the mean minus k times the standard deviation of the surrounding cells. It shows whether your best parameters sit on a stable plateau or on a single lucky cell, and writes an HTML report, a CSV and a picture of the map. Includes a Monte Carlo drawdown criterion and a small demo EA. Part of the free Robustness Lab set.
Prop Firm Risk Manager - daily loss and trailing drawdown guard
Account guard for prop-firm challenges. It does not open trades: it watches the whole account (manual trades and any EA) and closes everything before the firm's limits are broken. - Daily loss limit: closes all and blocks trading until the next day. - Max drawdown: static or trailing (can lock at the start balance); closes all and locks the account. - Optional profit-target lock, max lots / max positions, Friday close. - On-chart panel (equity, today's P/L, daily and drawdown room left) and push alerts. - Equity peak and lock are saved per account, so a restart does not reset the protection. Main inputs: StartBalance, DailyLossUSD, DDMode, MaxDDUSD, LockAtStart, safety buffers, TargetUSD, MaxOpenLots, MaxOpenPositions, FridayCloseOn, ResetLock. Attach to any one chart, any symbol and timeframe, with Algo Trading enabled.