PureBytes Links
Trading Reference Links
|
Need help with this code. This is some code from Trade Station which
creates two moving averages. I'd like to create these in AB as a
indicator to see what kind of trades would have been generated using
the cross over on the resulting plots. Any help would be appreciated.
Thanks in advance.
P1 = (H + L)/2;
L1 = 10;
Num = 0;
Count = 0;
Denon = 0;
CG = 0;
For Count = 0 to L1 -1 begin
Num = Num + (1 + Count)*P1[Count]);
Denom = Denom + (P1[Count]);
End;
IIf (Denom <> 0,CG = -Num/Denom,);
Plot(CG,"CG");
Plot(CG[1],"CG1");
George
|