When applied to financial markets this method is usually used to determine the moments of prices extreme deviation from a “standard” level.

Creation of a trend line using linear regression is based on the least squares method. This method assumes that a straight line is created that pass through the price points so that the distance between the prices points to the line is as short as possible. In an attempt to predict tomorrow prices, it is logical to assume that they will be located close to the values of today’s prices. If there is an uptrend, the best guess would be that the price value will be close to the current one with a certain upward deviation. Regression analysis provides statistical confirmation of these assumptions.

This indicator was first implemented in MQL4 and published in CodeBase at 09.10.2007.


MT5 Indicator – Download Instructions

LinearRegression is a Metatrader 5 (MT5) indicator and the essence of the forex indicator is to transform the accumulated history data.

LinearRegression provides for an opportunity to detect various peculiarities and patterns in price dynamics which are invisible to the naked eye.

Based on this information, traders can assume further price movement and adjust their strategy accordingly.

How to install LinearRegression.mq5?

  • Download LinearRegression.mq5
  • Copy LinearRegression.mq5 to your Metatrader Directory / experts / indicators /
  • Start or restart your Metatrader 5 Client
  • Select Chart and Timeframe where you want to test your indicator
  • Search “Custom Indicators” in your Navigator mostly left in your Metatrader 5 Client
  • Right click on LinearRegression.mq5
  • Attach to a chart
  • Modify settings or press ok
  • Indicator LinearRegression.mq5 is available on your Chart

How to remove LinearRegression.mq5 from your Metatrader 5 Chart?

  • Select the Chart where is the Indicator running in your Metatrader Client
  • Right click into the Chart
  • “Indicators list”
  • Select the Indicator and delete

Click here below to download MT5 Indicator:


Trade With Lowest Spreads
Previous articleJBrainTrendSig1
Next articleJ TPO