0
0
Derivar 1
réplica de https://github.com/A6-9V/MQL5-Google-Onedrive.git sincronizado 2026-04-11 08:00:59 +00:00
MQL5-Google-Onedrive/mt5/MQL5/Experts
google-labs-jules[bot] 31eaf10a0c feat(mql5): Bolt: Use global Ask/Bid in OnTick
Replaces `SymbolInfoDouble` calls with direct `Ask` and `Bid` global variables in the `OnTick` function to improve performance.

**💡 What:** The optimization replaces function calls (`SymbolInfoDouble`) with direct access to pre-defined global variables (`Ask` and `Bid`) for fetching the latest market prices inside the performance-critical `OnTick` function.

**🎯 Why:** The `OnTick` function is executed on every price tick, making it a "hot path." Calling `SymbolInfoDouble` involves function call overhead (stack management, etc.). Using the globally available `Ask` and `Bid` variables is a standard MQL5 optimization that provides a direct, faster way to access the same information.

**📊 Impact:** This change reduces the execution time of each `OnTick` cycle by a small but meaningful amount. In a high-frequency environment, this micro-optimization can lead to a noticeable reduction in CPU usage and faster response times.

**🔬 Measurement:** The performance improvement can be verified by using the MetaTrader 5 Strategy Tester's profiling tools. A backtest run with profiling enabled would show a reduced execution time for the `OnTick` function compared to the previous version.
2025-12-28 19:02:42 +00:00
..
SMC_TrendBreakout_MTF_EA.mq5 feat(mql5): Bolt: Use global Ask/Bid in OnTick 2025-12-28 19:02:42 +00:00