forked from LengKundee/MQL5-Google-Onedrive
💡 What: Replaced `SymbolInfoDouble()` calls with the predefined `Ask` and `Bid` global variables for fetching current market prices in `OnTick()` and related trade functions. 🎯 Why: The `SymbolInfoDouble()` function has a small overhead for each call. In a performance-critical function like `OnTick()`, which runs on every price tick, this overhead can add up. Using the globally available `Ask` and `Bid` variables is a direct memory access, which is faster and reduces the total execution time of a tick cycle. 📊 Impact: This is a micro-optimization that reduces function call overhead in the EA's hot path, leading to slightly faster tick processing and response times. 🔬 Measurement: The improvement can be measured by profiling the `OnTick` function execution time in the MetaTrader 5 Strategy Tester's profiling mode, comparing the version before and after this change. |
||
|---|---|---|
| .. | ||
| Experts | ||
| Indicators | ||