mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-11 06:40:57 +00:00
💡 What: This change caches static symbol properties (like point size, digits, tick value, etc.) in global variables during the EA's `OnInit` phase. 🎯 Why: The Expert Advisor was repeatedly calling `SymbolInfo...()` functions within the performance-critical `OnTick` execution path. These calls are relatively slow and the values they retrieve do not change during the EA's lifetime, making the repeated calls a source of unnecessary overhead. 📊 Impact: This optimization significantly improves performance by eliminating dozens of redundant function calls on every tick or trading decision. This results in a faster, more efficient `OnTick` cycle, allowing the EA to react more quickly to market changes. 🔬 Measurement: The improvement is verified by code inspection. The `SymbolInfo...` calls have been refactored out of the functions called by `OnTick` (like `CalculateLots`, `CalculateSL`, etc.) and are now performed only once at initialization. The existing test suite passes, confirming no change in logical behavior. |
||
|---|---|---|
| .. | ||
| Experts | ||
| Indicators | ||