CFDs and forex are complex instruments and come with a high risk of losing money rapidly due to leverage. Risk disclosure

Linear Regression Channel

This guide explains what the linear regression channel measures, how to draw it in MetaTrader, how to read it and when it gives a false picture.

Extrade Pakistan editorial team ·

On this page
  1. What the linear regression channel is
  2. The formula
  3. Adding it in MT4 and MT5
  4. Reading the channel: a drawn example
  5. Choosing settings (for experienced traders)
  6. Where it misleads
  7. Frequent questions

What the linear regression channel is

A linear regression channel is a straight trend line fitted through a chosen run of closing prices, with a parallel line above and below it. The middle line is the "best fit" line. It is the line that keeps the total squared distance between itself and the prices as small as possible. This method is called least squares.

The outer lines show how far price usually strays from that middle line. In short, the channel shows the average direction of the selected bars and how spread out price was around that direction.

It is a drawing tool built on statistics, not a forecast. It describes the past bars you selected and nothing more. For background on reading trends, see Market trends and Trendlines.

Linear regression 20SMA 20
Linear regression compared with a simple average of the same period (dashed): it reacts faster to new prices. Illustrative example: made-up numbers for learning, not real prices or a broker's conditions.

The formula

Take the bars in the channel. Number them by position (x) and use their closes (y). Let x̄ and ȳ be the averages of x and y.

Here σ is the standard deviation of the closes around the middle line, and k is the multiplier you choose. Some versions place the outer lines at the largest distance any bar reached from the middle line, not at a set number of standard deviations. Check which method your platform uses. The Standard Deviation page explains σ in detail.

Adding it in MT4 and MT5

In MetaTrader the channel is a chart object, not an indicator in the indicator list:

  1. Open the Insert menu, then Objects, then Channels.
  2. Choose the linear regression channel.
  3. Click the first bar and drag to the last bar of the period you want to measure.
  4. Open the object's properties to see or change the deviation setting, the colours and whether the line extends to the right.

The default deviation value differs between platform versions. Read it in the properties window rather than assuming it. If you want to practise without real money, an MT4 demo account or an MT5 demo account works for this. Platform details are on the MetaTrader 4 and MetaTrader 5 pages.

Reading the channel: a drawn example

The chart below is illustrative only. It shows no real prices.

A sloping channel in a clear trend often fits with Pullbacks. A flat channel looks like a range, and Support and resistance analysis may be more useful there.

Choosing settings (for experienced traders)

Where it misleads

Leveraged forex and CFD trading can lose money fast, whatever tool you use. Read Risk management before you use a channel in live decisions.

Frequent questions

Is the linear regression indicator the same as the channel?

No. The linear regression indicator plots the endpoint of a rolling regression for each bar, which gives a moving line. The channel is a single fitted line over a fixed window, with bands around it.

Is there a reliable regression channel strategy?

No method works in every market. Traders use the channel as context alongside other tools. It does not produce signals that are right on their own.

Why did my channel change shape?

It recalculates when bars are added or when you move its anchor points. Lock the end points if you want it to stay fixed.

Can I use linear regression in trading on any market?

You can draw it on any chart. It describes the data well only when price moves in a roughly straight line over the window you selected.

Related pages