Version 2.3 2026.01.18
The weekly loss limit was deactivated for optimal backtest results.
Version 2.2 2026.01.11
New Variables Added
Variables for persistence
string gridCountKey = ""; // Key for GridOrderCount
string gridActiveKey = ""; // Key for GridActive
string avgPriceKey = ""; // Key for Average Price

Variable to store average price
double lastRecordedAveragePrice = 0.0;
Version 2.1 2025.10.05
Version 2.1 transforms the simple EA from 1.17 into a full grid system, with recovery on pullbacks (adding BUY orders) and global protections (drawdown/weekly).
Ideal for long-term strategies in XAUUSD, but increases risk if the grid expands uncontrollably.

Improvements: Fallbacks for symbol data (e.g., tickValue), custom optimizations in the tester, and more robust error handling (e.g., INVALID_HANDLE).
Version 1.17 2025.09.28
Addition of input group Directives:
The input group directives were added before each group of parameters:

input group "Configuración General / General Settings": For Language, InpEnableCompounding, and InpCompoundingFactor.
input group "Indicadores Técnicos / Technical Indicators": For InpGridBars, InpATR_Threshold, InpATR_Period, InpRSI_Period, InpRSI_Threshold, InpEMA_Fast_Period, and InpEMA_Slow_Period.
input group "Gestión de Riesgo / Risk Management": For InpRiskPercent, InpSL_Pips, InpTP_Pips, InpTrailingStop, InpMinLot, InpMaxLot, InpMaxDrawdown, InpMinMarginLevel, InpMinAccountBalance, and InpMarginBuffer.

These directives ensure that the parameters are displayed in separate sections in the MetaTrader 5 backtest configuration dialog, improving organization and user experience.