PureBytes Links
Trading Reference Links
|
Try a: (a/(sum*0.6022))+0.0645
Michael Ferguson wrote:
I
have an ensign script for AMA that shows an error that causes AMA to malfunction.
Does someone know what the fix is? Thanks procedure
AdaptiveAverage;
var
i,j,period: word;
a,sum,amaq: real;
begin
period:= GetUser(eParm1);
amaq:=GetUser(1,BarBegin-1);
for i:=BarBegin to BarEnd do
begin
if i<=period then amaq:=Last(i)
else begin
a:=Abs(Last(i)-Last(i-period));
sum:=0;
for j:=i-period to i
do sum:=sum+Abs(Bar(eNet,j));
a:=(a/sum*0.6022)+0.0645;
THIS IS THE LINE THAT EW FLAGS
amaq:=amaq+Power(a,2)*(Last(i)-amaq);
end;
SetUser(1,amaq,i);
end;
To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|