MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 99bc51c770 Bolt: Cache ask/bid prices in OnTick to reduce redundant calls
💡 What: This change caches the `ask` and `bid` prices at the beginning of the `OnTick()` function and passes them as arguments to the `OpenBuyTrade()` and `OpenSellTrade()` functions. This eliminates redundant calls to `SymbolInfoDouble()` within the trade execution functions.

🎯 Why: The `OnTick()` function is a performance-critical hot path. The original code made unnecessary, duplicate calls to fetch symbol price information, adding overhead to every tick that resulted in a trade signal.

📊 Impact: Reduces redundant function calls in the `OnTick` execution path. While a micro-optimization, this improves the overall efficiency of the EA by ensuring price information is fetched only once per tick.

🔬 Measurement: The code's correctness is verified by the existing automated test suite. The performance impact can be confirmed by profiling the EA in the MT5 Strategy Tester, where a slight reduction in the execution time of `OnTick` can be observed.
2026-01-24 10:44:27 +00:00
..
Experts Bolt: Cache ask/bid prices in OnTick to reduce redundant calls 2026-01-24 10:44:27 +00:00
Indicators feat(mql5): cache MTF confirmation to reduce CPU load (#78) 2026-01-10 05:36:08 +07:00