Skip to content
All library documents

R-Squared Adaptive EMA with Floating Levels

Article ProRealCode

Summary

This indicator adjusts an exponential moving average using an R-squared measure calculated from price observations over a chosen period. The measure compares a linear fit of recent prices with their variation, then changes the EMA period through a formula so that the average responds differently as the measured fit changes. The plotted output also includes upper, lower, and midpoint floating levels, positioned by percentages of the adaptive EMA’s high-to-low range over a separate lookback window.

The document provides an implementation and example parameter values, but no trading rules, backtests, or performance results. It presents the average as a way to track price direction more precisely, yet does not show when to enter or exit positions or how to manage risk. The levels are derived from the moving average’s own recent range, so they are descriptive bands rather than independently validated support, resistance, or forecast levels. The method is an indicator component that could be adapted for other indicators, not a tested standalone strategy.

Key ideas

  • The indicator uses an R-squared calculation on recent prices to adapt the period of an exponential moving average.
  • Its plotted floating levels are based on the recent high-low range of the adaptive average.
  • A separate lookback controls the range used to calculate the upper, lower, and midpoint levels.
  • The document provides implementation details but no backtest or evidence of trading performance.
  • The indicator does not specify entry, exit, or risk-management rules.

Tags

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