Skip to content
All library documents

Standard Error Bands from a Smoothed Linear Regression

Article MQL5 code base

Summary

Standard Error Bands form a channel around a smoothed linear-regression estimate of price. The center is a linear regression calculated over a chosen period and then smoothed with a simple moving average. Upper and lower bands are placed at a configurable multiple of the standard deviation of the regression values around that center, creating a measure of dispersion around the fitted line.

The indicator exposes settings for the regression lookback, smoothing lookback, deviation multiplier, and input price. The document attributes the method to John Andersen in a 1996 magazine article and notes that a MetaQuotes implementation was translated from Russian. It describes the calculation rather than a trading rule: it provides no entry or exit criteria, asset-specific guidance, or test results. Users therefore need to choose parameters and assess how the bands behave for their instrument and timeframe.

Key ideas

  • The center line is a smoothed linear regression of the selected price.
  • The channel boundaries offset the center by a multiplier of regression-value standard deviation.
  • The regression period, smoothing period, multiplier, and applied price are configurable.
  • The description explains indicator construction but does not specify a trading strategy or report performance tests.

Tags

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