What Is The Linear Regression Indicator & How To Trade With It

Linear Regression Explained

The Linear Regression Indicator (LRI) was developed by Hilbert Ruff in 1991. It is an effective and easy-to-use tool to help anticipate future prices until they hit the levels markets by the Linear Regression Indicator.

What is the Linear Regression Indicator?

The linear regression indicator is displayed on the chart in the form of a channel formed by two parallel lines equidistant from the trend. The width of this corridor depends exclusively on the selected timeframe.

The indicator can be used when trading online with virtually any asset, from currency pairs to comodities, stocks and precious metals.

LRI Settings and Parameters

The Linear Regression Indicator looks like a regular channel. Depending on the situation, its bands can be considered as potential resistance or support lines. To create channels that fully meet your requirements, you can adjust the indicator inputs to the appropriate settings for your own trading strategy.

The main parameter that the trader will need to set is the channel width. In MT4, it is located in the input tab. The user will need to set the “bars to count”, based on the timeframe set by him.

Linear Regression Indicator in Metatrader
Linear Regression Indicator in Metatrader

For example, if we are talking about working on hourly intervals, then data for one day may be considered enough.

The remaining settings primarily perform a decorative function. Their main task is to make the chart’s visual perception as convenient as possible for the trader. Using the Stop Color and Trend Line Color tabs, set the color of the price and the borders of the channel, respectively.

The end lines can also be set to the desired thickness by changing the settings in LR WIDTH.

Linear Regression Indicator on chart
Linear Regression Indicator on chart

The formula for calculating the Linear Regression Indicator is as follows:

  • x – the current period
  • n is the total number of periods

How to use the Linear Regression Indicator?

There are two main trading strategies for working with the linear regression indicator:

  • Reversal strategy
  • Breakout strategy

In the first case, the trader focuses on the dynamics of price change within the channel. When it approaches the line of resistance or support, the trader anticipates that it will go in the opposite direction. That is, if the price has come close to the upper limit, they would look to close long positions and enter short. If it is at the very bottom of the channel, they may think about closing open sell positions and buying.

Linear Regression Indicator reversal area
Linear Regression Indicator reversal area

The strategy for the breakout involves the use of orders that are placed outside the borders but not too far from them. Considering that border crossing at a price is sometimes short-term; thus, it is better to play safe by setting a stop loss.

Linear Regression Indicator breakout
Linear Regression Indicator breakout

Well, of course, regardless of the chosen strategy, it is essential to assess the situation in the market as calmly as possible.

Linear Regression Indicator trading strategy

As the price is likely to stay in the ranging pattern for 70% of the time, we may therefore consider a reversal trading strategy such as the following:

Linear Regression Indicator buy strategy

  • Wait for the price to reach the lower band of the indicator.
  • Wait for the bullish candle to appear.
  • Enter on the close of bullish candle.
  • Place the stop-loss below the recent local low.
  • Look to exit the trade when the price reaches the upper band.
Linear Regression Indicator buy setup
Linear Regression Indicator buy setup

Linear Regression Indicator sell strategy

  • Wait for the price to reach the upper band of the indicator.
  • Wait for the bearish candle to appear.
  • Enter on the close of bearish candle.
  • Place the stop-loss above the recent local high.
  • Look to exit the trade when the price reaches the lower band.
Linear Regression Indicator sell setup
Linear Regression Indicator sell setup

Linear Regression Indicator Conclusion

The Linear Regression indicator can be used on your trading platform charts to help filter potential trading signals as part of an overall trading strategy.