HOW TO GET THE SLOPE OR GRADIENT OF THE REGRESSION CHANNEL OBJECT.

 

Hello,

Please help me find a solution to get the slope/gradient of MT5's regression channel object extending over any number of bars that I've specified.

 
Sakhile Mamba:

Hello,

Please help me find a solution to get the slope/gradient of MT5's regression channel object extending over any number of bars that I've specified.

https://www.mql5.com/en/code/127
Linear regression slope
Linear regression slope
  • www.mql5.com
Linear regression fits the following equation of a straight line to price data: The linear regression slope, given by this indicator, is equal to a normalized version of the coefficient b. The formula for b is: Sx = Sum(x, x = 1..n)= n*(n + 1)/2; Sy = Sum(y[x], x = 1..n); Sxx = Sum(x*x, x = 1..n) = n*(n+1)*(2*n+1)/6; Sxy = Sum(x*y[x], x =...