mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-11 10:00:57 +00:00
💡 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. |
||
|---|---|---|
| .. | ||
| SMC_TrendBreakout_MTF_EA.mq5 | ||