Linear regression curve
The linear regression line recalculated and plotted at every bar, tracking how the “best fit” trend shifts over time.
What the numbers mean
The lookback sets how many bars each regression is fitted through before its endpoint is plotted and the window rolls forward. Short settings produce a line that follows price closely; long ones produce a gentle spine through the trend.
- 20 — fast; tracks price closely
- 50 or 100 — a gentle spine through the trend
- Each plotted point is one regression's endpoint, recalculated as the window rolls forward
How it is used
Used as a lower-lag alternative to a moving average, both as a trend line and as the centre of regression-based channels.
- A lower-lag alternative to a moving average for trend direction
- The centre line for regression-based channels
How it relates to everything else
Against a simple moving average of the same period, the regression curve sits closer to current price and turns sooner, because it fits a slope rather than averaging levels. It reacts sharply when an outlier enters or leaves the window, which an SMA smooths over.
- Closer to price than an SMA of equal length
- The centre of the linear regression channel and standard error bands
- Its steepness is what linear regression slope reports as a number
What to watch for
It is still a fit to past bars, and it reacts abruptly when an outlier enters or leaves the window.