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
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.
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.
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
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.
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
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.
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.
Considering only a few candles will produce a very “sensitive” line, while more candles will produce a more static and slow one.
To install the indicators please follow the instructions below:
- Download the indicator file
- Open the Metatrader Data Folder (In File > Open Data Folder)
- Open the MQL4 Folder, or MQL5 for MT5
- Copy the file in the Experts folder
- Restart Metatrader
For more detailed instruction on how to perform the installation please visit this article.
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.