Appearance

Personalize your experience

Mode
Accent Color
Direction
Regression Trend

Regression Trend

Channels

A linear regression line with symmetrical standard deviation bands. Unlike subjective trend lines, the regression channel is mathematically determined from all data points, removing drawing bias and providing statistical context.

Theory & Background

The regression trend channel applies ordinary least squares (OLS) regression to price over a given lookback period. The center line is the linear regression line — the best-fit straight line through the data that minimizes the sum of squared residuals (the distances from each price bar to the line). Upper and lower bands are plotted at standard-deviation distances (default ±1σ) from the center line, creating a statistically volatility envelope.

This tool was popularized by John in his volatility framework (though center on a moving average, not a regression line) and further refined for trend analysis by Timothy Hayes. The key advantage over subjective trend lines isobjectivity: every trader using the same lookback period and sees the identical regression line and bands. There is no room for bias or wishful thinking.

The regression channel also provides the R-squared statistic, which quantifies how well the linear trend fits the on a scale from 0 (no linear relationship) to 1 (perfect linear relationship). An R-squared above 0.8 indicates a strong, reliable linear trend. Below 0.3 suggests the trend is weak, non-linear, or the market is ranging. This statistical context is one of the most valuable features of the tool.

Tool Design & Behavior

The Regression Trend tool requires 2 anchor points (minPoints: 2). Click at the lookback start , then to the current bar or the end of the trend being analyzed. The regression includes all price from the start point to the endpoint. The regression line and standard deviation bands are calculated and rendered instantly using OLS.

After placement, either endpoint to adjust the lookback period. The regression recalculates automatically for every pixel of movement, with the bands adjusting in real time. Drag the center regression line body to translate the entire study (preserving lookback length and slope). In multi-select , multiple regression channels move together.

On , the regression line, bands, and endpoints all highlight. The R-squared can be displayed as a floating label on the chart. A “” automatically extends the end as new bars form, making the regression channel a , updating tool that evolves with the market.

Anatomy

+1σ band−1σ bandRegression lineupper σlower σ
The center line is an unbiased best-fit straight line. Upper/lower bands are ±1 standard deviation — roughly 68% of price action should stay inside.
Channel line Regression / median Std dev band Price action Intersecting line
Regression line
OLS best-fit line through price; the center and reference of the channel.
Upper band
Center + N × σ (default 1 standard deviation). Statistical overextension zone.
Lower band
Center − N × σ (default 1 standard deviation). Statistical underextension zone.
Standard deviation (σ)
Volatility of the residuals from the regression line. Wider σ = more volatile.
Lookback period
Number of bars used in the OLS calculation. Determines the sensitivity of the regression.
R-squared
Statistical goodness-of-fit (0–1). Higher values indicate a stronger, more reliable linear trend.

Visual Configuration

The regression trend channel offers flexible styling for the center line, bands, and fill, plus statistical display .

Center line color/width/style
Appearance of the OLS regression line. Default is solid and prominent.
Upper band color/width/style
Appearance of the upper standard deviation band.
Lower band color/width/style
Appearance of the lower standard deviation band.
Standard deviations
Number of σ for band distance (default 1.0, range 0.5 to 3.0). Use 2.0 for extreme levels.
Fill
Fill between the bands with adjustable . Visualizes the probability envelope.
Show R-squared
Display the R-squared as a floating label on the chart.
Show slope
Display the regression slope (price change per bar) numerically.
Lookback
Number of bars for the OLS calculation (default 50, range 5–500).
Follow price
Auto-extend the end as new bars form, keeping the channel .
Font
Label font family, size, and color for statistical readouts.
★
Pro tip:A short lookback (10–20 bars) makes the channel sensitive to recent moves and useful for short-term trading. A long lookback (50–200) reveals the macro trend. Experiment with both to find the fit for your timeframe and trading style.

Trading Theory & Application

Mean Reversion at the Bands: When price touches the upper band, it is statistically overextended from the trend — a toward the regression line is probabilistically favored. Similarly for the lower band. Enter counter-trend at the bands with a target at the center line and a stop beyond the band (band + 0.5σ). This works best when R-squared is moderate (0.3–0.7) and the market is cycling within the channel.

Trend Continuation at Center Line: In a strong trend (steep slope, R-squared above 0.8), use the regression line as a entry on pullbacks. Enter when price touches the regression line and resumes in the trend direction. The slope confirms the trend direction; the bands serve as trailing profit targets. This is the most reliable in trending markets.

Statistical Extreme Signals: A close outside the ±2σ band is a rare event (approximately 5% probability under normal ) and often precedes a sharp reversal or . Look for exhaustion candles (, long wicks, bearish/bullish engulfing) at ±2σ levels. A ±2σ combined with a momentum divergence (, MACD) is a powerful counter-trend setup.

How to Draw

  1. 1
    Select the lookback start
    Click at or before the start of the trend you want to analyze. The regression begins here.
  2. 2
    Set the end point
    to the current bar or the end of the trend you are analyzing. The regression line and bands update instantly.
  3. 3
    Adjust standard deviations
    Change the σ multiplier in the settings. Default ±1σ contains ~68% of . ±2σ contains ~95%.
  4. 4
    Check R-squared
    Enable R-squared display. Above 0.8 confirms a strong linear trend. Below 0.3 suggests weak trend or range.
  5. 5
    Evaluate the slope
    The regression line slope shows the average price change per bar. to the trend .
★
Pro tip:A short lookback (10–20 bars) makes the channel sensitive to recent moves; a long lookback (50–200) reveals the macro trend. Experiment with both for different analytical contexts.

Interpretation

The regression channel gives you three independent pieces of information: (1) the trend direction and strength from the regression line slope and R-squared, (2) the current overextension or underextension from the band touches, and (3) the statistical probability of price remaining within the channel.

  • Price at the upper band suggests statistical overextension — a toward the center line is favored.
  • Price at the lower band similarly signals a potential back toward the regression line.
  • Price walking the band (hugging the upper band for multiple bars) = strong trend with accelerating momentum.
  • A flattening regression line indicates trend deceleration — the linear trend is losing conviction.
  • R-squared above 0.80 = strong, reliable linear trend. Below 0.30 = weak or non-existent trend.
  • A widening band over time indicates increasing volatility. A narrowing band indicates decreasing volatility.

Advanced Techniques

Multi-Lookback Stacking: Overlay three regression channels with different lookbacks — for example, 20 bars (short-term), 50 bars (-term), and 200 bars (long-term). When all three regression lines slope in the same direction, the trend is confirmed across multiple horizons. When they diverge, a trend change may be imminent.

Regression Slope Divergence Analysis: the regression slope angle with the angle of the most recent price swing. If the recent swing is steeper than the regression line, momentum is accelerating beyond the mean trend — expect reversion toward the regression line. If the recent swing is shallower, the trend is decaying — expect the regression line to flatten further.

σ Band as Volatility Stop: In a trend-following , use the opposite σ band as a trailing stop. For a in an uptrend, the stop at the lower (−1σ) band. If price closes below −1σ, the trend has deviated significantly and the position should be closed for a statistical violation.

Common Mistakes

!
Caution:Regression lines are sensitive to outliers. A single extreme bar (flash crash, spike) can tilt the entire regression line significantly. Consider using regression or a trimmed lookback if the contains obvious outliers.
!
Caution:Do not confuse standard deviation bands with . Bollinger Bands are centered on a moving average (which lags); regression trend bands are centered on a best-fit line (which does not lag). The two behave very differently during strong trends — Bollinger Bands will widen, while regression bands maintain a consistent .
ℹ
Note:Standard deviation bands are . In strongly trending markets, price can ride the upper band for periods. Do not short purely because price is above the +1σ line — always check the slope and R-squared first.

References & Further Reading

Related articles

  • ATR Channel

    Charts / Drawing Tools / Channels

    A least-squares trend line with boundaries a multiple of average true range away on each side. A volatility channel over a range you select — it answers how…

  • Disjoint Channel

    Charts / Drawing Tools / Channels

    Two boundaries that start out parallel and can then be pulled apart. Neither the slopes nor the time extents are tied together, so the tool draws anything…

  • Dual Regression Channel

    Charts / Drawing Tools / Channels

    Two independent least-squares fits over the same bars — one through the highs, one through the lows. The only fitted channel whose boundaries need not be…

  • Envelope Channel

    Charts / Drawing Tools / Channels

    A hand-placed base line with boundaries a fixed percentage of price above and below it. The only channel whose width scales with the instrument, which makes…

  • Flat Top/Bottom Channel

    Charts / Drawing Tools / Channels

    One sloped boundary and one horizontal boundary. Place the flat line above the slope for a flat top (ascending triangle, bullish bias) or below it for a…

  • Parallel Channel

    Charts / Drawing Tools / Channels

    A trend-correction tool formed by two parallel trend lines. Price oscillates between dynamic support and resistance, offering repeated mean-reversion…

  • Price Channel

    Charts / Drawing Tools / Channels

    The highest high and the lowest low of a range you select, drawn as two horizontal levels. A Donchian channel over a window you chose rather than a rolling…

  • Raff Regression Channel

    Charts / Drawing Tools / Channels

    A least-squares fit with each boundary placed at the furthest bar on its own side, so the channel touches both extremes and encloses every bar in the…

  • ABCD Pattern

    Charts / Drawing Tools / Patterns

    A four-point harmonic structure (A\u2013B\u2013C\u2013D) defined by the AB=CD leg equality rule. The simplest and most foundational harmonic pattern \u2014…

Browse all knowledge base articles →