How do you reproduce a Market validation timeout when the test stops on a different chart after each update?
- 2026.11.18
- www.mql5.com
- Market validation: v1.30 passed, v1.41 reports no trades - how can I obtain diagnostic details?
- Product Validation issue on MT5
- Multicurrency EA. What to use: OnTimer, OnChartEvent, OnTick, OnFakeindicator?
There is no supported way to retrieve the Market validation agent's last simulated timestamp: when "tester takes too long time" is followed by "strategy tester report not found", the agent process was terminated before flushing a report.
Your local timing already explains why Market validation fails: 2,184 seconds (~36 minutes) for just 17 simulated days (2-19 Nov 2026) scales to many hours over a multi-month or multi-year validation window, well past the validator's execution limit. Different updates stop on different charts simply because slight timing variance and startup history caching shift which pair crosses the wall-clock ceiling first.
With a 1-second OnTimer() polling 11 symbols (especially 24/7 crypto symbols like BTC/ETH alongside FX/Gold), the main bottlenecks in Strategy Tester are usually:
1. Running HistorySelect(0, TimeCurrent()) or full symbol scans inside OnTimer() 86,400 times per simulated day even when no bar closed and no position/order state changed.
2. Pulling CopyRates/CopyTicks/CopyBuffer across all 11 symbols on every timer tick instead of checking for a new bar or active exposure first.
To isolate whether the cost is HistorySelect(), secondary symbol loading, or position logic locally (using a multi-month Every tick run on EURUSD H1 with an uncached tester folder), accumulate GetMicrosecondCount() counters and log once in OnDeinit():
ulong g_us_timer = 0, g_us_hist = 0, g_cnt_timer = 0; // reset in OnInit void OnTimer() { ulong t0 = GetMicrosecondCount(); // ... position/order state checks ... ulong h0 = GetMicrosecondCount(); // ... HistorySelect / CopyRates / symbol calls ... g_us_hist += (GetMicrosecondCount() - h0); g_us_timer += (GetMicrosecondCount() - t0); g_cnt_timer++; } // In OnDeinit(): PrintFormat("calls=%I64u timer_ms=%.1f hist_ms=%.1f", g_cnt_timer, g_us_timer/1000.0, g_us_hist/1000.0);
Once measured, moving deal/order reconciliation to OnTradeTransaction(), narrowing HistorySelect() to an incremental timestamp, and gating secondary symbol reads by SERIES_LASTBAR_DATE or open exposure normally cuts Strategy Tester runtime by an order of magnitude without changing trading behavior.