[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Error 29, variable 'xxx' without having been initialized !!!



PureBytes Links

Trading Reference Links

For the moment I solved in this way ... 

for( i = 100; i < BarCount; i++ )
{
avrg1[0]=yield1[0];
avrg1[i]=(1-alpha)*avrg1[i-1]+alpha*yield1[i];
dvst1[0]=yield1[0];
dvst1[i]=sqrt((1-alpha)*dvst1[i-1]^2+alpha*(yield1[i]-avrg1[i])^2);
}



--- In amibroker@xxxxxxxxxxxxxxx, "Angio" <angio1967@xxx> wrote:
>
> 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 amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> 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" <angio1967@>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > 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
> > > 
> > > 
> > >
> >
>




------------------------------------

**** 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/