MQL5-Google-Onedrive/mt5/MQL5
google-labs-jules[bot] b6842c72df feat(perf): Defer ATR calculation until required in OnTick
This optimization refactors the `OnTick` function to lazy-load the Average True Range (ATR) value.

Previously, the ATR was calculated via `CopyBuffer` on every potential trading signal, regardless of whether the user's Stop Loss or Take Profit settings required it. This created unnecessary overhead in a performance-critical function.

This change introduces a new `GetATR()` helper function that only calculates and caches the ATR value when it's explicitly needed by the SL/TP logic. This avoids the expensive `CopyBuffer` call entirely for configurations that do not rely on ATR, improving the overall efficiency of the Expert Advisor.
2026-01-14 17:22:15 +00:00
..
Experts feat(perf): Defer ATR calculation until required in OnTick 2026-01-14 17:22:15 +00:00
Indicators feat(mql5): cache MTF confirmation to reduce CPU load (#78) 2026-01-10 05:36:08 +07:00