What it is
The regression channel fits one straight line through a fixed number of recent closes, the line that sits as close as possible to all of them at once. That line is the market's trend over the window, and its slope tells you the direction and pace: tilted up, flat or tilted down.
Two outer lines run parallel to it, one above and one below. Their distance comes from how far closes have typically strayed from the middle line, so a calm market gets a narrow channel and a choppy one gets a wide channel. Because the whole line is refitted on every new candle, the channel shifts as fresh prices arrive.
How it is calculated
1. Take the last 100 closes (the length setting), numbered 0 to 99 in time order. 2. Fit a least-squares straight line through them: the slope and starting point that make the total of the squared gaps between each close and the line as small as possible. 3. For each of those closes, measure its gap from the line, square it, average the squares and take the square root. That is the standard deviation of the error. 4. Multiply it by the width setting (2 by default). 5. Draw the upper line that distance above the regression line and the lower line the same distance below.
Settings
| Setting | Default | Range | What it changes |
|---|---|---|---|
| Length | 100 | 10 to 1000 | How many candles the best-fit line is drawn through. Longer gives a steadier, slower trend line; shorter hugs recent swings and refits more sharply. |
| Width | 2 | 0.5 to 5 | How many standard deviations the outer lines sit from the middle. 2 contains most closes; 1 gives tighter edges that price touches often. |
How to read it
How to trade it
- 1
Use the default 100 candles on a 15 minute or 1 hour chart and only trade in the direction of the middle line's slope.
- 2
In a rising channel on gold, wait for a candle to touch or poke below the lower line and then close back inside it. Buy on that close.
- 3
Put the stop a little below the low of the candle that touched the edge, for example 6 to 8 points on a 15 minute gold chart.
- 4
Take the first target at the middle line and the second near the upper line. On US30 the distance from edge to middle on a 1 hour chart is often a few hundred points, so check it gives at least 1.5 times your stop.
- 5
If price closes outside the upper line of a rising channel, do not sell it. Treat it as acceleration and wait for a pull-back to the middle line.
A buy from the lower line of a rising channel is wrong once a candle closes below the lower line and the next candle fails to get back inside. If the middle line then flattens or turns down, the trend the trade relied on has gone.
WickSpeak runs in your browser with nothing to install. When you add the regression channel, it writes a plain-English reading on the live candle: what the indicator is, what it is doing right now, how to trade it and what would prove that reading wrong. It tells you whether the channel is rising, falling or flat, where price sits inside it, and whether the latest close is inside or outside the edges.
In Playbook, our no-code strategy builder, the regression channel can be a condition in a play. It can test whether the regression channel: price closes above the upper band; price closes below the lower band; price is inside the bands; price is above it; price is below it. Each condition can run on any of 12 timeframes from 1 minute to weekly, combined with up to 11 others, and the play can be backtested on past candles with your own costs and turned into alerts on screen, by email or by phone push.
Best markets and timeframes
Works best on trending markets with clean swings such as gold, US30 and NAS100 on 15 minute to 4 hour charts. On very slow or very news-driven candles the straight line fits poorly, so check the channel actually contains most of the recent price.
Common mistakes
- Forgetting the channel is refitted every candle, so an old touch of the edge may no longer line up with where the edge is drawn now.
- Selling the upper line in a strong rising channel, which is fighting the very trend the line describes.
- Using a length that is far too short, so the channel tilts with every swing and stops being a trend at all.
Works well with
Questions traders ask
What is the best setting for a linear regression channel?
The common starting point is 100 candles and 2 standard deviations, which is WickSpeak's default. Shorter lengths such as 50 suit intraday trading on 5 to 15 minute charts. Widen to 2.5 if price pokes through the edges too often for your style.
Does the linear regression channel repaint?
Yes, in the sense that the whole line is refitted on each new candle, so the channel you see today is not where it was drawn last week. That is how it is meant to work. Judge it on the current candle, not on old touches.
What is the difference between a regression channel and a standard deviation channel?
They are usually the same idea: a least-squares line with edges set a number of standard deviations away. Some platforms measure the deviation of price itself and others the deviation from the line. WickSpeak uses the deviation of closes from the fitted line.
Is a regression channel better than Bollinger Bands?
Neither is better; they answer different questions. Bollinger Bands follow a moving average and bend with price, while a regression channel is one straight line that shows the trend over a fixed window. Many traders use the channel for direction and bands for timing.