Skip to content
All library documents

Adaptive Price Envelopes from Recent High-Low Ranges

Article ProRealCode

Summary

The document presents an adaptive envelope indicator built around a moving average of closing prices. It estimates a changing band width from half the recent high-low range, smooths that range over a lookback window, and adds and subtracts the result from the average close to form upper and lower bands. The default lookback is ten periods, and the code allows that setting to be changed.

This creates bands whose distance from the central average responds to recent price ranges, rather than relying on a fixed percentage offset. The material provides the calculation concept and implementation snippet, but no entry or exit rules, market examples, or measured trading results. It therefore describes a volatility-sensitive charting indicator, not a tested standalone strategy.

Key ideas

  • The indicator centers its envelope on an average of closing prices.
  • Its band width is based on a smoothed half-range between recent highs and lows.
  • The lookback length controls how much recent price history informs the bands.
  • The document gives no tested trading rules or evidence of performance.

Tags

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