to the greatest coders of the forum!!
Can you please explain the geometry/ math behind this code (Roy Kelly Cycle Identifier . I know it repaints!) ..Please
Using Pi value, and this magical 1.414 or diagram to show it as abcd...
double ZeroLag(double price, int length, int pos)
if (length < 3)
double aa = MathExp(-1.414*3.14159 / length);
double bb = 2*aa*MathCos(1.414*180 / length);
double CB = bb;
double CC = -aa*aa;
double CA = 1 - CB - CC;
double CD = CA*price + CB*ZL1[pos+1] + CC*ZL1[pos+2];
Not entirely sure about that math, but I can tell you that 1.414 is not magical. It's simply sqrt(2).
I seem to recall that sin(45°) = cos(45°) = 1/sqrt(2).
Maybe that plays into the logic.
yes Cos 45=1/1.414.
But I am not sure what is the logic in applying that so the indicator plots Top or bottom of a cycle?
If I understand the concept correctly I will be able to draw it as ABCD and the angle involved. and which angle is involved? But I can not still draw that diagram because I do not understand the concept