Skip to content
All library documents

ATR Smoothing Methods: RMA, SMA, EMA, and WMA

Article MQL5 code base

Summary

This indicator note explains how Average True Range is built from True Range, defined as the greatest of the current high-low range and the absolute gaps between the current high or low and the previous close. It describes an initialization step that averages an initial set of True Range values to obtain the first ATR value, then compares four ways to smooth later values: RMA, SMA, EMA, and WMA.

RMA and EMA update the prior smoothed value using different coefficients; SMA recalculates a simple average over the selected lookback, and WMA gives more weight to recent observations. The note identifies its SMA mode with the standard ATR function and shows an example chart context for XAUUSD on an hourly interval. It provides calculation descriptions rather than a trading rule or performance test. ATR measures range-based volatility, but the note does not explain parameter selection, signal interpretation, or how to use the measure for entries, exits, or position sizing.

Key ideas

  • True Range incorporates both the candle range and gaps relative to the previous close.
  • The first ATR value is initialized from an average of True Range observations over the selected lookback.
  • RMA and EMA use recursive updates with different smoothing coefficients.
  • SMA and WMA recalculate across the lookback, with WMA emphasizing more recent observations.
  • The note explains the indicator calculation but supplies no tested trading strategy.

Tags

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