mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-11 09:00:56 +00:00
💡 **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. |
||
|---|---|---|
| .. | ||
| MQL5 | ||