MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] b46a6490c8 Bolt: Prevent redundant OnTick calculations
💡 **What:** Added a guard clause to the `OnTick()` function to exit early if a new bar has not yet formed.

🎯 **Why:** The `OnTick()` function was executing expensive calculations (like `CopyRates` and `CopyBuffer`) on every incoming price tick, even when the underlying chart data hadn't changed. This caused unnecessary CPU load, especially in volatile markets.

📊 **Impact:** This change drastically reduces the number of times the core trading logic is executed, limiting it to once per bar. This leads to significantly lower CPU usage and a more efficient Expert Advisor.

🔬 **Measurement:** The improvement can be verified by adding logging statements to the `OnTick()` function and observing that the main logic is now only executed once per bar, instead of multiple times per second.
2026-01-03 19:03:36 +00:00
..
Experts Bolt: Prevent redundant OnTick calculations 2026-01-03 19:03:36 +00:00
Indicators feat: Add SL/TP modes and risk management to EA 2025-12-26 08:17:39 +00:00