mirror of
https://github.com/A6-9V/MQL5-Google-Onedrive.git
synced 2026-04-11 10:00:57 +00:00
This commit introduces a critical performance optimization to the OnTick() function in the main Expert Advisor. Previously, the function called the expensive `CopyRates()` function on every incoming price tick, only to potentially discard the data if a new bar had not formed. This change implements an "early exit" strategy. By using the lightweight `iTime()` function at the very beginning of `OnTick()`, the EA now immediately checks for a new bar and exits if one has not formed. This ensures that the resource-intensive data copying and subsequent trading logic only run once per bar, significantly reducing CPU load and improving the overall efficiency of the advisor. |
||
|---|---|---|
| .. | ||
| Experts | ||
| Indicators | ||