mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-11 04:40:57 +00:00
💡 What: This change caches the results of `SymbolInfo...` function calls in global variables during `OnInit`. These cached values are then used throughout the EA, particularly in the performance-critical `OnTick` function and its callees. 🎯 Why: The `SymbolInfo...` functions are relatively expensive. Calling them repeatedly within `OnTick`, which executes on every price tick, introduces unnecessary overhead and can degrade EA performance, especially in volatile markets. Caching these static symbol properties once at initialization avoids this overhead. 📊 Impact: Reduces the number of expensive function calls on every tick, leading to a more efficient and responsive Expert Advisor. The exact impact depends on market conditions and terminal performance, but it eliminates dozens of redundant calls per second. 🔬 Measurement: This can be verified by profiling the EA in the MetaTrader 5 Strategy Tester. A performance improvement will be observable in the total execution time of the `OnTick` function. |
||
|---|---|---|
| .. | ||
| Experts | ||
| Indicators | ||