MQL5-Google-Onedrive/mt5
google-labs-jules[bot] 62d83aa0b7 feat(perf): Bolt: Optimize Donchian calculation with local loop
💡 What: Replaced `iHighest` and `iLowest` MQL5 function calls with a direct `for` loop over the pre-fetched `rates` array.

🎯 Why: The `iHighest` and `iLowest` functions introduce unnecessary function call overhead and may perform redundant lookups on historical data that has already been copied into the local `rates` array. Iterating directly over the in-memory array is more efficient.

📊 Impact: This change reduces the processing time within the `OnTick` function for each new bar. While the impact per call is small, it occurs on a performance-critical path, leading to a more efficient Expert Advisor, especially in volatile markets with frequent ticks.

🔬 Measurement: The improvement can be verified by profiling the `OnTick` function execution time in the MetaTrader 5 Strategy Tester. The optimized version is expected to show a lower average execution time per tick.
2026-01-10 17:16:51 +00:00
..
MQL5 feat(perf): Bolt: Optimize Donchian calculation with local loop 2026-01-10 17:16:51 +00:00