Skip to content
All library documents

Adaptive Moving Average with Counter-Based Length and Reset Signals

Article ProRealCode

Summary

The document describes an adaptive moving average whose lookback grows from a base length as a counter advances, up to a configurable cap. A selected market condition resets or changes the counter, allowing the smoothing window to respond to a trend or indicator state. Reset choices include moving-average slope, RSI extremes, volume relative to its average, Bollinger Band breaks, MACD crosses, stochastic or CCI extremes, and rate of change. Trend direction is then assessed using price crossings and a smoothed trend measure, with colors and markers representing confirmation and possible starts.

The source provides a ProRealTime implementation and example parameter values, but no backtest, trading returns, or comparative evidence that this adaptive method improves on fixed-length averages. Its many reset choices and thresholds create tuning risk, while the described trend confirmation can lag. Results will depend on instrument, timeframe, implementation details, and validation outside the data used to select settings.

Key ideas

  • A counter progressively extends the moving-average length from a base setting to a maximum.
  • A configurable indicator or price condition resets or reverses the counter.
  • Trend confirmation and visual markers are derived from price and smoothed trend behavior.
  • The method offers several reset indicators but provides no performance comparison or backtest evidence.
  • Parameter choices can affect lag and create tuning risk across instruments and timeframes.

Tags

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