I think the input is ... (yield1-avrg1)^2

output[i]=factor[i] * input[i] + (1 - factor[i]) * output[i-1];

dvst1=sqrt(alpha*(yield1-avrg1)^2+(1-alpha)*(Ref(dvst1,-1))^2);


but also the output[i-1] should be ... ^2 !!!




--- In [email protected], "Tomasz Janeczko" <gro...@...> wrote:
>
> Hello,
> 
> Oh sorry, second AMA should of course take yield1-avrg1 as input.
> 
> 
> instead of:
> dvst1=sqrt((1-alpha)*Ref(dvst1,-1)*Ref(dvst1,-1)+alpha*(yield1-avrg1)*(yield1-avrg1));
> 
> you should write
> dvst1=sqrt( AMA( yield1-avrg1, alpha ));
> 
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "Angio" <angio1...@...>
> To: <[email protected]>
> Sent: Sunday, August 09, 2009 11:15 AM
> Subject: [amibroker] Re: Error 29, variable 'xxx' without having been 
> initialized !!!
> 
> 
> > Tomasz thanks again, yesterday I studied the manual all day ...
> > 
> > but you are sure that the second AMA formula is correct?
> > 
> > So instead of:
> > avrg1=(1-alpha)*Ref(avrg1,-1)+alpha*yield1; 
> > 
> > you should write:
> > avrg1= AMA( yield1, alpha );
> > 
> > and instead of:
> > dvst1=sqrt((1-alpha)*Ref(dvst1,-1)*Ref(dvst1,-1)+alpha*(yield1-avrg1)*(yield1-avrg1));
> > 
> > you should write
> > dvst1=sqrt( AMA( yield1, alpha ));
> > 
> > by
> > 
> > 
> > 
> > ------------------------------------
> > 
> > **** IMPORTANT PLEASE READ ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> > 
> > TO GET TECHNICAL SUPPORT send an e-mail directly to 
> > SUPPORT {at} amibroker.com
> > 
> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > http://www.amibroker.com/feedback/
> > (submissions sent via other channels won't be considered)
> > 
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> > 
> > Yahoo! Groups Links
> > 
> > 
> >
>


Reply via email to