• Overview
  • Reviews
  • Comments

LRS Lineal Regresion Slope MT4

If instead of calculating the value of the linear regression line (LRMA indicator), we calculate the value of its slope, we get LRS or linear regression slope indicator.

Since the slope is positive when prices rise, zero when they are in range and negative when they are lowered, LRS provides us the data on the price trend.


Parameters

  • Symbol (empty = current symbol): working pair, for example, EURUSD.
  • Period calculation: number of previous bars, to which the calculation is applied.
  • Signal period: smooth signal period (EMA).
  • Price applied: open, close...
  • TimeFrame: H1, H2, D1...
  • Visual corrector: set the image to the reported slope.


Calculations

                      sum(XY, n) - avg(Y, n)*sum(X, n)
  Y= a + mX;      m=  --------------------------------        a= avg(Y, n) - m*avg(X, n)
                      sum(X2, n) - avg(X, n)*sum(X, n)

According to the above formulas, the moving average of ​​"Y" values builds the LRMA indicator; the moving average of ​​"m" values builds the LRS indicator.

The usefulness of this indicator increases when it is used with the R-squared indicator that reports the strength of the trend, while LRS informs us of the positive or negative strength.

No reviews