Linear Regression Indicator For Metatrader

Linear Regression is a statistical technique. While this technique is normally used to detect a trend in some generic data, this can also be applied to Forex and Trading in general.

In this article we will see what is Linear Regression, how it can help with trading, and some Linear Regression Indicator for the Metatrader MT4 and MT5 platforms.

What Is Linear Regression?

Statistically speaking, Linear Regression is a basic way of producing predictive analysis.

This practice, which also has a formula, models the relationship between two variables starting from a data series.

Defining the two variables as TIME and PRICE, the application of Linear Regression will try to find a relation between the two.

Without going into the details of the calculation, and the formula, the end result of linear regression is a straight line that tries to fit as much as possible with the prices in a time frame.

Traders think that Linear Regression has some predictive power because once calculated, the prices should fluctuate around this line.

However, as new prices come in also the line needs to be updated.

 

How To Use Linear Regression In Trading

Linear Regression can be used in trading for different reasons.

As we will see in the next sections, some uses of Linear Regression can be:

  • Determine the major trend
  • Spot possible reversals and trend continuations
  • See the momentum of the trend
You can also find here some Linear Regression Indicator For Metatrader that can help with this goals.

 

Linear Regression In Metatrader

Linear Regression is not a new concept for Metatrader.

Both MT4 and MT5 include some linear regression objects that you can easily add to the chart.

Linear-Regression-Object-Metatrader-MT4-MT5

You can add a Linear Regression Channel to any Metatrader chart just selecting the tool from the graphical objects and selecting how many candles to consider and where to place it.

This is a start but there can be other ways of applying Linear Regression to a chart.

We are now going to see some Linear Regression indicators that might help with your trading.

Linear Regression Channel Indicator For MT4 And MT5

The Linear Regression Channel Indicator is an indicator for MT4 and MT5 that automatically draws a regression channel on chart.

The indicator keeps the channel up to date when the new candles form.

This indicator is similar to manually adding the channel however it saves you the time of placing the channel and moving it following the new candles that are forming.

 

 

MT4-Linear-Regression-Channel-Indicator-1

Utility Of The Regression Channel Indicator

Some examples of how the Regression Channel indicator can help are:

  • Show the major trend
  • Show the price fluctuation
  • Possible detection of reversals and trend continuations
As we mentioned, the price tend to bounce between the channel and following the trend when the channel is considering enough candles.
However, keep in mind that the market is also unpredictable so as the price moves the channel updates and a change from an upwards pointing channel to downwards pointing might indicate a change of trend.

Linear Regression Slope Indicator For MT4 And MT5

The Linear Regression Slope Indicator is an indicator for MT4 and MT5 that draws the slope of a regression channel on chart.

As you can see from a regression channel, this has a slope.

The slope can bring information with it that can help with trading decisions in some cases and can be examined on its own.

The slope indicator show a histogram chart in the bottom section of the chart representing the slope of the channel.

 

MT4-Linear-Regression-Line-Slope-Indicator-3

Utility Of The Regression Slope Indicator

Some examples of how the Regression Slope indicator can help are:

  • Current Trend, depending if the slope is above or below zero
  • Momentum of the trend, indicating if the trend is becoming stronger or weaker
Depending on the parameters set you can have a slope more dynamic or more static.
Considering only a few candles will produce a very “sensitive” slope, while more candles will produce a more static one.

Linear Regression Line Indicator For MT4 And MT5

The Linear Regression Line Indicator is an indicator for MT4 and MT5 that draws a line following the regression channel on chart.

If we consider only the last point of the middle line of a regression channel, and we trace it historically, we obtain a regression line that follows quite closely the price.

The Regression Line can be used similarly to a Moving Average however it follows the price more closely so it might provide better signals.

 

MT4-Linear-Regression-Line-Indicator-1

Utility Of The Regression Line Indicator

Some examples of how the Regression Line indicator can help are:

  • Can be used as trading signal when the price is above or below the line
  • Possible strategy using multiple regression lines crossovers, similar to moving averages.
Depending on the parameters set you can have a line more dynamic or more static.
Considering only a few candles will produce a very “sensitive” line, while more candles will produce a more static and slow one.

Installation Instructions

To install the indicators please follow the instructions below:

  1. Download the indicator file
  2. Open the Metatrader Data Folder (In File > Open Data Folder)
  3. Open the MQL4 Folder, or MQL5 for MT5
  4. Copy the file in the Experts folder
  5. Restart Metatrader

For more detailed instruction on how to perform the installation please visit this article.

Conclusion

In this article you saw how it is possible to use Linear Regression as an additional tool in trading.

Linear Regression can help determining the trend, reversals and momentum.

You also saw three indicator that you can add to your toolbox.

 

Please feel free to leave a feedback regarding the indicator or Contact Us for anything else.

 

Leave a Comment