Skip to content
All library documents

Moving Polynomial Regression Bands for Price Breakout Signals

Article TradingView scripts

Summary

This indicator fits a polynomial to a rolling window of price observations using least squares, with QR decomposition used to calculate the regression coefficients. It projects the fitted curve one step forward and estimates in-sample error with mean absolute error. The previous bar’s forecast and error estimate define upper and lower bands, scaled by a user-selected multiplier.

A close crossing above the upper band marks a breakout, while a cross below the lower band marks a breakdown; the indicator also offers alerts and alternative displays for the fitted line and its prior prediction. Users can adjust the input series, window length, polynomial order, and band multiplier. Although the description frames the bands as a probability interval, the document supplies no calibration procedure or statistical validation of that probability. It presents an indicator implementation rather than trading rules or performance evidence, so signals should not be treated as proven forecasts.

Key ideas

  • The indicator fits a polynomial regression to a rolling price window and projects its value one step ahead.
  • It estimates fitting error with mean absolute error and uses the prior forecast plus or minus scaled error to create bands.
  • Crossing above the upper band signals a breakout, while crossing below the lower band signals a breakdown.
  • The polynomial order, window length, source series, and band multiplier are configurable.
  • The document provides no validation showing that the bands have reliable probability coverage or profitable signals.

Tags

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