Free TradingView indicator

Multi-Anchored Linear Regression Channels.

Plot up to three regression channels, choose where each calculation begins, and compare price with its fitted trend and surrounding bands.

Source: TanHef's TradingView publication · Page reviewed

Overview

Several ways to study a fitted trend.

This public TradingView indicator can draw up to three independently configured regression channels or bands. A regression line summarizes the direction of price over a selected set of bars. The bands show how far prices lie from that fitted line under the chosen deviation method.

A channel is a description of the selected data, not a forecast or a guaranteed support or resistance level.

Start and length

Choose what the channel measures.

Each channel has an anchor that determines its lookback. You can use a fixed length or choose anchors tied to price, volume, candle range, correlation, slope, other indicators, time, market sessions, events, or an external input source. Minimum and maximum lengths constrain the search; the step setting controls how many candidate bars are checked.

Changing the anchor can change the channel substantially. Check where it starts before comparing two channels or interpreting a signal.

Calculation

Fit and band settings are separate.

For the centre line, choose ordinary linear regression or one of several alternative fitting methods, including Ridge, Lasso, Elastic Net, Huber, least-absolute-deviation, and Bayesian linear methods. For the bands, choose a deviation calculation such as mean or median absolute distance, percentage distance, fitted highs and lows, or an ATR-style measure. The multiplier changes band width.

Regression and deviation each have an optional bias control. Positive bias gives more weight to recent bars; negative bias emphasizes older bars. The indicator also supports linear and logarithmic price scales. Use a consistent scale when comparing chart views.

Reading the chart

Slope, correlation, and position.

A rising regression line has a positive slope; a falling one has a negative slope. Pearson’s R describes how closely the selected prices align with a straight line, from −1 to +1. A value near zero means weak linear alignment, not that the market is safe or directionless.

An optional table brings together the chosen settings and calculated readings, including length, slope, R, and price’s position within the channel. These readings depend on the anchor and period selected.

Signals and alerts

Set the criteria you want to watch.

Optional visual signals and alerts can compare price’s percentage position in the channel and the R reading with thresholds you set. The criteria can be used independently or together. A signal means your selected conditions were met; it does not establish that price will reverse or continue.

Start with one channel and a simple anchor. Add more channels, alternative fitting methods, or signals only when each answers a specific question for your analysis.

Open Multi-Anchored Linear Regression Channels on TradingView