Please help: Data points of Linear Regression Channel object

 
Hello,

I'm trying to do an important project. I have a program that draws the regression channel object:

 ObjectCreate("LRtest",OBJ_REGRESSION,0,dStart,0,dEnd,0);



the value of the endpoint displays when the mouse is over it, but my program needs to get the value of the endpoint.

ObjectGet("LRtest",OBJPROP_PRICE1)

does not work.

ObjectGetValueByShift("LRtest",4)

does not work.

Please help.

OR------

PLEASE give the formula used to calculate the regression channel object.

Thank you very much.

 
Forum search - put "linear regression" - push "Find" button
"Linear Regression Channel, Calculating Method"
 
thank you very much. I did try to search the forums many times for "linear regression" but I somehow did not see that one.

Thank you very much, I will study it with excitement.

:)
 
Slawa,

In the code at "Linear Regression Channel, Calculating Method" ,

Is your fabs() function the same as MT4's MathAbs() function?

Thank you.
 
Is your fabs() function the same as MT4's MathAbs() function?

Yeah
Note that bars are numbered from begin to end - last bar is current bar; and series arrays are indexed from end to begin.
Reason: