Skip to content
All library documents

Non-Lag Moving Average with ATR Bands and an Interactive Panel

Article MQL5 code base

Summary

This document describes the implementation of a Non-Lag moving average indicator with ATR bands and an interactive chart panel. The panel can toggle the trend display, be moved, show selected internal values, and report indicator values for a bar chosen on the chart. The indicator separates buffer data from plotting logic, uses enumerations and a structure to manage buffers, and assigns moving-average calculations to a dedicated class.

The calculation flow retrieves moving-average and ATR data from the trading terminal, checks whether those calculations are ready, copies buffers, runs the indicator, and updates bar statistics. The author also describes retry behavior for data handles and chart events used for clicks, object clicks, and dragging. These are implementation details rather than evidence of predictive value: no tests, performance results, or precise trading rules are presented. The excerpt does not fully specify the ATR band formula or how the non-lag calculation is derived, so it is insufficient on its own to reproduce or assess the indicator's signals.

Key ideas

  • The indicator combines a Non-Lag moving average with ATR bands and an interactive information panel.
  • Enumerations and buffer structures organize plotted and calculated series.
  • Separate classes handle moving-average calculations and panel behavior.
  • The calculation sequence checks terminal data readiness before copying inputs and updating the display.
  • The document describes software behavior but supplies no signal performance evidence or complete formulas.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.