All indicators

Standard Error Bands

By LuxAlgoApr 13, 2020

Static chart image

The Standard Error Bands fit a linear regression line to price over a lookback window and frame it with bands offset above and below by a multiple of the standard error of the regression estimate. The standard error measures scatter around the fitted trend, not a flat average, so the bands tighten when price hugs its trend and widen when the fit degrades — width reads as trend quality. This build is a standard implementation of Jon Andersen's original formulation with the classic defaults: a 21-bar regression, bands at plus and minus 2 standard errors, and 3-period smoothing. The smoothed midline plots as the Basis between the Upper Band and Lower Band, all three refitting as new bars arrive.

How to Trade the Standard Error Bands?

  • Tight bands around a sloping Basis: an orderly trend to trade with the slope.
  • Widening bands: the trend is losing definition — tighten risk or stand aside.
  • Close beyond either band: an overextension past what the fitted trend allows — prone to revert toward the Basis, or the first sign of a turn, so confirm.
  • Pullbacks to the Basis: in a clean trend, dips to the midline offer continuation entries near the trend's center.

Standard Error Bands Settings

  • Length (default 21): bars used to fit the regression and compute its standard error; longer for broader trends, shorter for recent swings.
  • SE Multiplier (default 2): the standard-error multiple offsetting the bands; higher flags only larger dislocations, lower flags more often.
  • Smoothing (default 3): the SMA applied to the regression line and both bands before plotting; 1 plots the raw fit.
  • Source (default close): the price series the regression is fitted to.

Alerts

Two alert conditions — Cross Above Upper Band and Cross Below Lower Band — fire when the close crosses the named band.

Frequently Asked Questions

How are Standard Error Bands different from Bollinger Bands?

Bollinger Bands widen with the standard deviation of price around a moving average, so width tracks volatility; these bands widen with dispersion around a fitted regression, so width tracks trend quality. A volatile market can still trend cleanly — wide Bollinger Bands, narrow error bands.

What are the best settings for Standard Error Bands?

The 21/2/3 defaults are the classic published values. Lengthen the window when the larger trend matters, lower the SE Multiplier for earlier but noisier flags, and keep Smoothing just high enough to stop the channel jittering.

What is the main limitation of Standard Error Bands?

The regression refits on every bar, so today's channel is not yesterday's. Width also says nothing about direction — a tight channel can be tightly falling — so pair band touches with a momentum or volume read.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

The Library is free. Quant makes it yours.

Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.