MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] cfb558838c feat: ️ add new bar check to OnTick to reduce CPU usage
💡 What: Added a lightweight new bar check at the beginning of the `OnTick()` function. This prevents the entire function from executing on every price tick if a new bar has not yet formed.

🎯 Why: The `OnTick()` function is computationally expensive, involving calls to `CopyRates`, `CopyBuffer`, and various loops. Without this check, these expensive operations were being performed multiple times per second, consuming unnecessary CPU cycles.

📊 Impact: This change will dramatically reduce the EA's CPU usage, especially on active symbols, by ensuring the core trading logic runs 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 "Experts" log tab. Before this change, log entries would appear on every tick. After this change, they will only appear once per bar, demonstrating the reduction in executions.
2026-01-08 17:03:53 +00:00
..
Experts feat: ️ add new bar check to OnTick to reduce CPU usage 2026-01-08 17:03:53 +00:00
Indicators feat: Add SL/TP modes and risk management to EA 2025-12-26 08:17:39 +00:00