Sketching a Regression Channel from Highs and Lows
Summary
This indicator draws a visual regression channel using separate linear regressions of price highs and lows over a configurable lookback, set to 20 by default. It offsets the upper and lower regression lines by one and a half standard deviations, then projects line segments from a point behind the current bar to beyond it. The segment colors change according to whether each boundary is rising or falling compared with its earlier value. Transparency is based on the distance between the two boundaries, making channel width visually apparent.
The author presents the script mainly as a demonstration of a platform's segment-drawing feature, while suggesting it might also be used for trading. It supplies an implementation but no backtest, entry or exit rules, or evidence that channel touches predict reversals or continuation. The channel is therefore a charting aid whose behavior depends on the chosen lookback and scaling, rather than a validated standalone strategy.
Key ideas
- The indicator fits separate regression lines to highs and lows over a configurable period.
- It expands each line by one and a half standard deviations to form channel boundaries.
- Boundary colors indicate whether the corresponding line is rising or falling relative to an earlier reading.
- The channel's transparency varies with the distance between its upper and lower edges.
- The author gives no backtest or trading rules, so the indicator's predictive value is unestablished.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.