MQL5-Google-Onedrive/mt5/MQL5/Experts
google-labs-jules[bot] a401042d92 Bolt: Cache static symbol properties in EA
💡 What: This change caches frequently accessed, static symbol properties in global variables during the Expert Advisor's `OnInit` phase. It also replaces `SymbolInfoDouble()` calls for Ask/Bid prices with the faster, pre-defined `Ask` and `Bid` global variables.

🎯 Why: The `OnTick()` function and the functions it calls (`CalculateLots`, `CalculateSL`, etc.) are on a performance-critical hot path. The original code made numerous calls to `SymbolInfo...()` functions on every tick to retrieve values that never change during the EA's operation (e.g., point size, digits, lot size rules). This created unnecessary function call overhead.

📊 Impact: Reduces the number of function calls on every trade setup, making the EA's execution path more efficient. While the impact per tick is small, it adds up over time in a high-frequency environment, leading to slightly faster reaction times.

🔬 Measurement: The improvement can be verified by profiling the EA in the MetaTrader 5 Strategy Tester. Executing the EA with and without these changes will show a reduction in the total time spent inside the `OnTick` function. The code is also cleaner and follows best practices for MQL5 performance.
2026-01-22 19:48:08 +00:00
..
ExpertMAPSARSizeOptimized_Improved.mq5 Improve ExpertMAPSARSizeOptimized EA with enhanced risk management, logging, and safety features 2026-01-19 14:19:52 +07:00
SMC_TrendBreakout_MTF_EA.mq5 Bolt: Cache static symbol properties in EA 2026-01-22 19:48:08 +00:00