PureBytes Links
Trading Reference Links
|
Would someone be so kind as to post an ela for the following
simple indicator? I did it in TS3.5, but I would like to be
able to use it in SC4 also. Other poor, forgotten SC4 users
might be interested too.
Cogo.ela
-------------------------
{Center Of Gravity Oscillator, TASC May, 2002}
Inputs: Price((H+L)/2), Length(10);
Vars: count(0), Num(0), Denom(0), COG(0);
Num = 0;
Denom = 0;
For count = 0 to Length - 1 begin
Num = Num + (1 + count)*(Price[count]);
Denom = Denom + (Price[count]);
End;
If Denom <> 0 then COG = -Num/Denom;
Plot1(COG, "COG");
Plot2(COG[1], "COG1");
---------------------------
Thanks,
David
|