I found the indicator "Mesa Sine Wave" in Metastock very useful for trading, so i asked Equis Support if i can buy the indicator from them. To my surprise, they sent me the formula with no further mention of charges. An indicator by the name of "EhlersSineWave" was put up my NT staff in one of the threads but the formula seems to be different as i found in the .xml file.
Here is the formula i received from Equis Support:
rp:=(Cos(0)*C)+(Cos(360/2)*Ref(C,-1));
ip:=(Sin(0)*C)+(Sin(360/2)*Ref(C,-1));
1p:=If(Abs(rp)>.001,Atan(ip,rp),90*Neg(ip));
2p:=If(rp<0, 1p+180,1p);
3p:=2p+90;
4p:=If(3p<0, 3p+360, If(3p>360,3p-360,3p));
2p
************************************************** *
I'm still trying to make a complete sense of it and coding it into NT is something i'm terribly weak at.
Any help with respect to coding would be appreciated.
Thank You.
Comment