MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] c8bc24eecc feat(performance): Optimize OnTick by checking for new bar
💡 What: This optimization introduces a lightweight check using `iTime()` at the beginning of the `OnTick()` function.

🎯 Why: The `OnTick()` function runs on every price tick. The previous implementation called the expensive `CopyRates()` function on every tick, which is inefficient. This change ensures that the main logic of the EA only runs when a new bar has actually formed on the signal timeframe.

📊 Impact: This significantly reduces the EA's CPU usage, as the expensive `CopyRates()` call and subsequent calculations are now executed only once per bar instead of on every tick.

🔬 Measurement: The improvement can be verified by observing the EA's execution time in the MetaTrader 5 profiler. The number of calls to `CopyRates` will be drastically lower, leading to a much lower overall execution time.
2026-01-04 19:10:31 +00:00
..
Experts feat(performance): Optimize OnTick by checking for new bar 2026-01-04 19:10:31 +00:00
Indicators feat: Add SL/TP modes and risk management to EA 2025-12-26 08:17:39 +00:00