MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 0e6a4904d9 Bolt: Cache symbol properties to optimize OnTick
💡 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.
2026-01-21 19:42:34 +00:00
..
Experts Bolt: Cache symbol properties to optimize OnTick 2026-01-21 19:42:34 +00:00
Indicators feat(mql5): cache MTF confirmation to reduce CPU load (#78) 2026-01-10 05:36:08 +07:00