MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 65624e5c0e feat(mql5): Optimize OnTick performance
Replaced `SymbolInfoDouble()` with predefined `Ask`/`Bid` variables and consolidated `CopyRates()` calls.

- **What:** This commit introduces two key performance optimizations to the `OnTick` function, a critical hot path in the MQL5 Expert Advisor.
- **Why:** The original code used inefficient methods for fetching price and bar data, leading to unnecessary function call overhead and redundant I/O operations on every price tick.
- **Impact:** These changes reduce the execution time of the `OnTick` function, leading to faster strategy execution and reduced resource consumption. Using predefined variables is significantly faster than function calls, and a single `CopyRates` call is more efficient than two.
- **Measurement:** Performance improvement can be verified by profiling the EA's `OnTick` execution time in the MetaTrader 5 Strategy Tester before and after the changes. A noticeable reduction in the average execution time per tick is expected.
2026-01-20 17:30:06 +00:00
..
Experts feat(mql5): Optimize OnTick performance 2026-01-20 17:30:06 +00:00
Indicators feat(mql5): cache MTF confirmation to reduce CPU load (#78) 2026-01-10 05:36:08 +07:00