MQL5-Google-Onedrive/mt5/MQL5/Experts
google-labs-jules[bot] 1c51928cba Bolt: Add new bar check to OnTick
💡 **What:** Added a lightweight check at the start of the `OnTick()` function to exit early if a new bar has not yet formed.

🎯 **Why:** The `OnTick()` function runs on every price tick, but the trading logic only needs to be evaluated once per bar. The previous implementation called the expensive `CopyRates()` function on every tick, causing unnecessary CPU load.

📊 **Impact:** This change will significantly reduce the CPU usage of the Expert Advisor, especially on volatile instruments with many ticks per second. It ensures the expensive logic runs only when necessary.

🔬 **Measurement:** The improvement can be verified by observing the EA's execution time in the MetaTrader 5 profiler or by a noticeable decrease in CPU load from the terminal process when the EA is running on a chart.
2026-01-06 17:59:47 +00:00
..
SMC_TrendBreakout_MTF_EA.mq5 Bolt: Add new bar check to OnTick 2026-01-06 17:59:47 +00:00