Skip to content
All library documents

Volatility Adaptive Moving Average with Range-Based Period Selection

Article ProRealCode

Summary

The indicator adjusts its moving-average period according to how many recent bars it takes for the high-to-low range to reach a chosen percentage of the current price. A wider move reached quickly produces a shorter period and a more responsive average; quieter conditions produce a longer period. The user can select among seven average types, from simple and exponential to time-series, and optionally display changes in the period.

The document explains the calculation and provides implementation code, but it reports no trading tests or performance evidence. The lookback is found with a loop, which may make calculation slow; the author suggests limiting calculations to recent bars. The chosen percentage, price series, and average type affect the result, and the indicator itself does not specify entry, exit, or risk rules. The period measures the bars required to reach a price range, so it adapts to realized movement rather than forecasting future volatility.

Key ideas

  • The period is the number of bars needed for the high-to-low range to reach a set percentage of current price.
  • A faster move to that range shortens the average period, while slower movement lengthens it.
  • The indicator supports seven selectable moving-average types.
  • The loop can slow calculations, and the document recommends limiting processing to recent bars.
  • No backtest or evidence of trading performance is provided.

Tags

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