Skip to content
All library documents

Moving Polynomial Regression for Smoothing and Trend-Direction Estimates

Article TradingView scripts

Summary

The Moving Regression indicator fits a polynomial to a rolling window of past prices, then evaluates that fit at the latest point to create a smoothed series. It can also extend the fitted curve by one step and color the plotted line according to whether that estimate is higher or lower, providing a simple trend-direction signal. At polynomial degree zero, the series is equivalent to a simple moving average of the same length.

Window length and polynomial degree jointly control the balance between smoothness and lag: longer windows and lower degrees produce smoother, slower responses, while higher degrees can reduce lag at the cost of more noise. The document presents uses such as momentum assessment, trend confirmation, and possible support or resistance reference, but gives no trading results or forecasting validation. The projected next value is an extrapolation of a local fit, so the color change should be treated as an estimate rather than reliable prediction, especially when price behavior shifts abruptly.

Key ideas

  • A polynomial is fitted to a rolling sample, and its value at the latest observation forms the smoothed series.
  • An optional one-step extrapolation colors the line to indicate estimated direction.
  • Degree zero reproduces a simple moving average with the same window length.
  • Longer windows and lower degrees smooth more but add lag; higher degrees can reduce lag while retaining more noise.
  • The document describes applications but provides no evidence that the forecast is profitable or reliable.

Tags

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