MQL5-Google-Onedrive/mt5
google-labs-jules[bot] 287b4d1159 Bolt: Optimize Price Retrieval with Pre-defined Variables
💡 **What:** This change replaces `SymbolInfoDouble()` function calls with the pre-defined global variables `Ask` and `Bid` for fetching current market prices within the `OnTick()`, `OpenBuyTrade()`, and `OpenSellTrade()` functions.

🎯 **Why:** The `OnTick()` function is a performance-critical hot path that executes on every price tick. The `SymbolInfoDouble()` function, while accurate, introduces overhead from the function call and property lookup. Using the native `Ask` and `Bid` variables is a standard MQL5 optimization that provides a more direct and faster way to access the latest prices.

📊 **Impact:** Reduces the execution time of the EA's core logic by eliminating unnecessary function call overhead in a high-frequency loop. While the impact per tick is small, this leads to a cumulative performance improvement and lower latency in trade signal processing.

🔬 **Measurement:** The improvement was verified by running the repository's validation and automation test suites (`python scripts/ci_validate_repo.py` and `python scripts/test_automation.py`), which confirmed that the optimization introduced no functional regressions. The performance benefit is a well-established best practice in MQL5 development for performance-critical code.
2026-01-23 10:38:49 +00:00
..
MQL5 Bolt: Optimize Price Retrieval with Pre-defined Variables 2026-01-23 10:38:49 +00:00