top of page

Linear regression channel

01.png

linear regression channel is an indicator which has been written according to linear regression and exponential moving average ( ema ).

Similar to the 200-day Moving Average, large institutions often look at long term Linear Regression Channels.
A Linear Regression Channel gives more objective potential buy and sell signals based on price volatility and It consists of three parts:

​

 

  • Linear Regression middle curve

Traders usually view the Linear Regression curve as the fair value price for the future, stock, or forex currency pair.
When prices deviate above or below, traders may expect prices to go back towards the Linear Regression channel.
As a consequence, when prices are below the Linear Regression middle curve, this could be viewed by some traders as a good time to buy, and when prices are above the Linear Regression Line, a trader might sell.
Of course other technical indicators would be used to confirm these inexact buy and sell signals.

​

  • Upper Channel curve: A curve that runs parallel to the Linear Regression middle curve and is usually two standard deviations above the Linear Regression. 
     

  • Lower Channel curve: This curve runs parallel to the Linear Regression middle curve and is usually two standard deviations below the Linear Regression.
     

The upper and lower channel curve contain between themselves either 68% of all prices (if 1 standard deviation is used) or 95% of all prices (if 2 standard deviations are used).
When prices break outside of the channels, either: Buy or sell opportunities are present or the prior trend could be ending.
 

Linear Regression Channel Possible Buy Signal
 

When price falls below the lower channel line, and a trader expects a continuation of the trend, then a trader might consider it as a buy signal.
 

Linear Regression Channel Possible Sell Signal

An opportunity for selling might occur when prices break above the upper channel line, but a continuation of the trend is expected by the trader. Other confirmation signs like prices closing back inside the linear regression channel might be used to initiate potential buy or sell orders. Also, other technical indicators might be used to confirm.


Trend Reversals

When price closes outside of the Linear Regression Channel for long periods of time, this is often interpreted as an early signal that the past price trend may be breaking and a significant reversal might be near. Linear Regression Channels are quite useful technical analysis charting tools. In addition to identifying trends and trend direction, the use of standard deviation gives traders ideas as to when prices are becoming overbought or oversold relative to the long term trend.

Default Parameters:
 

  • linear regression length: (200) The number of bars to use in the calculation of linear regression.

  • EMA length:(20) the number of bars for smoothing by exponential moving average.

  • Deviation: (2) The number of standard deviations to use to draw the channel above and below the Linear Regression Line.

​
 

bottom of page