MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 0bbcba4c14 feat(ea): cache static symbol properties on init
What:
Caches the results of `SymbolInfo...` calls (e.g., tick size, volume step, point value) into global variables once during the Expert Advisor's `OnInit` function. Helper functions and `OnTick` logic are refactored to use these cached values instead of making repeated calls.

Why:
The `OnTick` function is executed frequently, and the `SymbolInfo...` functions involve lookups that are unnecessary to repeat for static data. This repeated lookup adds processing overhead to every tick, which can be significant in volatile markets. Caching these values reduces the per-tick workload, making the EA more efficient.

Impact:
This change is expected to reduce the execution time of the `OnTick` function, leading to faster response times and lower CPU usage. While the exact impact depends on market conditions and broker execution, this is a standard and effective optimization practice in MQL5.

Measurement:
The performance improvement can be verified by profiling the EA's `OnTick` execution time in the MetaTrader 5 Strategy Tester before and after the change. A noticeable reduction in the average execution time per tick is expected.
2025-12-27 19:05:05 +00:00
..
Experts feat(ea): cache static symbol properties on init 2025-12-27 19:05:05 +00:00
Indicators feat: Add SL/TP modes and risk management to EA 2025-12-26 08:17:39 +00:00