bifurqué depuis LengKundee/MQL5-Google-Onedrive
💡 What: Replaced `iHigh()` and `iLow()` function calls with direct array access within the `OnTick()` function for retrieving Donchian Channel price levels. 🎯 Why: The `OnTick()` function is a performance-critical hot path that executes on every price update. The original code made redundant function calls to `iHigh()` and `iLow()` to retrieve price data that was already loaded into the local `rates` array. 📊 Impact: This change reduces unnecessary function call overhead in a high-frequency loop. While a micro-optimization, it leads to a small but meaningful improvement in execution speed and reduces processing time for each tick. 🔬 Measurement: Performance can be verified by profiling the `OnTick()` function's execution time in the MetaTrader 5 Strategy Tester before and after the change. A decrease in the average execution time per tick would confirm the improvement. |
||
|---|---|---|
| .. | ||
| MQL5 | ||