Concept
Standard-error Channel
Standard-error Channel, also known as Raff channel, is a Trend concept. The Library holds 1 implementation — a working definition you can pull into Quant.
The standard Standard-error Channel indicator
Standard-error Channel exactly as classically defined — the faithful reference build of the original formula, free to run in Quant.
What is a Standard-error Channel?
A standard-error channel is a linear regression line drawn through a lookback window with parallel bands offset above and below by a multiple of the standard error of estimate, the statistic measuring how far prices typically sit from the fitted line. Unlike bands based on the standard deviation of price itself, the standard error measures dispersion around the trend, so the channel stays narrow when price hugs its regression line and widens when the fit is loose, whatever the slope.
The Raff regression channel, which Gilbert Raff described in the early 1990s, is the closely related variant some platforms group under the same name: instead of a statistical offset, it widens the parallels just enough to enclose the furthest high or low from the regression line. Both versions refit as new bars arrive, so the drawn channel changes across the window, and the common two-standard-error convention contains most, not all, of the price action inside it.
Mechanically, the standard error of estimate is the square root of the average squared residual, adjusted for the two parameters the regression consumes (slope and intercept). Because the bands are symmetric around a sloped centerline, the channel expresses trend and dispersion in one object, unlike an MA envelope, whose fixed-percentage width never reflects fit; and because residuals shrink when price tracks its trend cleanly, width doubles as a readout of trend quality, a tight channel marking an orderly trend and a ballooning one a trend losing definition.
The channel turns an eyeballed trendline into a repeatable, parameter-defined object: two traders with the same window and multiplier draw the same channel. It slots into trend workflows alongside tools such as an MA slope filter or a trend regime label, with the outer bands watched for the overextensions and breakouts that end or accelerate the fitted trend.
How to identify a standard-error channel on a chart
Platforms draw the channel from two clicks; the real decision is the window.
- 1Anchor the window at a meaningful origin, typically the swing that started the current leg, and end it at the current bar.
- 2Apply the standard-error (or Raff) channel tool; the platform fits the least-squares line and offsets the parallels, with two standard errors a common default.
- 3Check the fit: price should cross the centerline repeatedly rather than living on one side, and the bands should hold the bulk of bars; if not, the window likely spans more than one trend.
- 4Watch the interactions: tags of the outer bands, closes beyond them, and behavior at the centerline, which often acts as the trend's equilibrium.
- 5Re-anchor after a confirmed reversal, since a channel fitted across two opposing legs describes neither.
How it's calculated
A linear regression line fitted to the lookback window with parallel bands offset by a multiple of the regression's standard error.
The Raff Regression Channel is the related variant that sets the parallels at the greatest distance price traded from the regression line in the window instead of at k standard errors.
Some implementations divide by n rather than n - 2 when computing SE.
Unless anchored, the regression is refit on every new bar, so previously plotted values change.
How traders use it
- As a trend-following frame: while price holds inside the channel the regression trend is treated as intact, and closes beyond a band flag either an overextension or the start of a trend change worth confirming before acting.
- As a fit-quality gauge: narrow bands mean the move is orderly and regression-based levels are meaningful, while wide bands warn that the linear fit explains little of the recent movement.
- As anchored geometry from a swing: starting the window at a significant low or high makes the channel express that leg's trend, with the outer bands then watched as sloped support and resistance.
- As a pullback map: in a rising channel, entries are hunted near the lower band or centerline rather than at the upper band, a sloped analogue of buying dips at dynamic support.
- As a crossover filter: taking moving average crossover signals, such as an EMA crossing an SMA, only when they agree with the channel's slope.
Standard-error channel vs. related trend tools
Trendline: A trendline connects chosen extremes by hand; the channel is fitted to every close in the window by least squares. The trendline is subjective but fixed once drawn, the channel objective but refit on each bar.
MA Envelope: An envelope offsets a moving average by a fixed percentage, so its width never adapts; the standard-error channel's width comes from the actual scatter around the trend, tightening and widening with fit quality.
Supertrend: Supertrend is a stateful stop-and-reverse line that flips on ATR-sized breaks; the channel is a descriptive fit with no flip logic. One is a signal device, the other a lens on the trend's shape.
Concept family
Trend
100 concepts mapped · 100 in the Library
Standard-error Channel FAQ
What is the difference between a standard-error channel and a linear-regression channel?
Both center on the same least-squares line; the offset statistic differs. A linear-regression channel typically offsets by the standard deviation of prices measured around the fitted line, or by the largest excursion from it, while a standard-error channel uses the standard error of estimate, a close cousin that also adjusts for the two fitted regression parameters. The bands often look similar, and platforms mix the labels freely, so check which statistic yours actually uses.
Does a standard-error channel repaint?
Yes, by construction. The regression and its error bands are refit over the window on every new bar, so the entire drawn channel shifts with new data. That is useful for describing the current trend but misleading for backtesting touches of historical bands, because only each bar's own real-time values were actually available at the time.
What is a Raff regression channel?
Gilbert Raff's variant: the same least-squares centerline, with the parallels pushed out just far enough to contain the furthest high or low in the window. Because one extreme sets the width, a lone spike can make the channel much wider than the typical dispersion, which the standard-error version avoids by using an average-based statistic.
What settings work for a standard-error channel?
There is no canonical setting. The window should cover the leg being described, and two standard errors is the common multiplier. Shorter windows track turns quickly but refit violently; longer windows are stabler but blend regimes. Many traders treat the anchor choice as the real parameter and the multiplier as cosmetic.
Is a close outside the channel a breakout signal?
Not by itself. The bands are set so most closes stay inside, so occasional outside closes are expected even in a healthy trend. A single tag often marks overextension; a series of closes outside, especially with the channel's slope flattening, is the pattern traders read as a genuine break or trend change worth confirming.
Can the channel be built on something other than a straight line?
Yes. The same residual-band idea applies to any fitted curve: polynomial fits, or locally weighted fits such as LuxAlgo's LOWESS Channel & Extrapolation, which bends the centerline with the data before offsetting error bands, at the cost of more parameters and the same refitting caveats.
Turn Standard-error Channel into a trading strategy.
Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it with AI.
