Skip to content
All library documents

Building a Linear Regression Channel with Standard Deviation Bands

Article ProRealCode

Summary

This document describes a price channel built from centered linear regressions of high and low prices over a configurable lookback, set to 300 periods by default. It calculates separate regression lines for highs and lows, then offsets each line by the corresponding price series’ standard deviation to form outer channel boundaries. The output includes the two regression lines and upper and lower deviation bands.

The material provides indicator construction logic, not a trading system: it does not define entry or exit rules, explain how to interpret a channel touch or break, or report test results. The lookback is a default rather than a universally justified setting, and the description does not clarify the standard deviation calculation details or address how a centered regression behaves in live use. Traders would need to verify platform semantics and assess potential signal timing before using the channel operationally.

Key ideas

  • The channel uses separate centered linear regressions of high and low prices.
  • The default regression lookback is 300 periods.
  • Standard deviation offsets create outer bands around the regression lines.
  • The document provides indicator logic but no trading rules or performance evidence.
  • Live use requires checking the platform’s handling of centered regression.

Tags

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