MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] 0eb0be16ec Bolt: Optimize OnTick by consolidating CopyRates calls
💡 What: Consolidated two `CopyRates` calls into a single call within the `OnTick()` function in the `SMC_TrendBreakout_MTF_EA.mq5` Expert Advisor.

🎯 Why: The `OnTick()` function is a performance-critical hot path that runs on every price tick. The original code made two separate, expensive calls to fetch historical price data (`CopyRates`). This redundancy creates unnecessary overhead. By fetching all required bar data in a single call, we reduce I/O and processing, making the EA more efficient.

📊 Impact: This change reduces the number of data-fetching operations by 50% on every new bar, leading to a small but meaningful reduction in tick processing time. This improves the overall responsiveness and efficiency of the Expert Advisor.

🔬 Measurement: The improvement can be verified by profiling the `OnTick` function's execution time before and after the change in the MetaTrader 5 Strategy Tester or a live environment. The code is visibly more efficient by inspection, as a redundant function call has been removed.
2026-01-19 17:14:25 +00:00
..
Experts Bolt: Optimize OnTick by consolidating CopyRates calls 2026-01-19 17:14:25 +00:00
Indicators feat(mql5): cache MTF confirmation to reduce CPU load (#78) 2026-01-10 05:36:08 +07:00