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

Re: [amibroker] Trouble with Coding Vidya In AFL



PureBytes Links

Trading Reference Links

CMO is the Chande Momentum Oscillator. In this case it is the net 
momentum as a fraction of the absolute momentum over Length number of 
bars expressed as a percentage.

Both VIDYA (Variable Index DYnamic Average) and CMO are described in 
"The New Technical Trader" by Chande and Kroll ISBN 0471597805.

Bill

Graham wrote:

> What is CMO ?
>
> On 7/9/05, m.smith <ink@xxxxxxxxx> wrote:
> >
> > People,  I get a syntax error and it says  expecting an identifier. 
> Marshall
> >  
> > 
> > -------Original Message-------
> > 
> > From: bilbod
> > Date: 07/08/05 13:57:53
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] Trouble with Coding Vidya In AFL
> >  Below is Vidya someone posted here a while back.
> >
> > Bill
> > ---
> > Length=21;
> > Smooth=5;
> >
> > Change = C - Ref( C, -1 );
> > SU = Sum( C - Ref( C, -1 ) > 0, Length );
> > SD = Sum( C - Ref( C, -1 ) < 0, Length );
> > CMO = 100 * ( SU - SD ) / ( SU + SD );
> >
> > AbsCMO=( abs(CMO) )/100;
> >
> > SC=2/(Smooth+1);
> >
> > VIDYA=AMA( C, SC*AbsCMO );
> >
> > Plot( Close, "Price", 4, 64 );
> > Plot( VIDYA, "Vidya", 5 );
> > ---
> > rajak1981 wrote:
> >
> > > I am using the following code for vidya.
> > > When I plot Vidya , Vidya[0] is initialized fine
> > > But after that its all empty.
> > > Any idea as to what I am doing wrong?
> > > Factor[i] is being computed correctly as can be seen from the plot.
> > > The problem is occuring due to Vidya[i-1]. I am not sure why.
> > >
> > >       SC=0.5;
> > >       Vidya[0]=C[0];
> > >       CMO_Up=Sum( IIf( C > Ref(C,-1) ,  C-Ref(C,-1) ,0 ) ,Length ) ;
> > >       CMO_Dn=Sum( IIf( C < Ref(C,-1) , Ref(C,-1) -
> > > C  ,0 ) ,Length );
> > >
> > >
> > >
> > > for(i=1;i<BarCount;i++)
> > > {
> > >       CMO[i]=(( CMO_Up[i] -CMO_DN[i])  /( CMO_Up[i]+CMO_Dn[i]));
> > >       AbsCMO[i]=(abs(CMO[i]));
> > >       Factor[i]=SC*AbsCMO[i];
> > >     Vidya[i]=(Factor[i]*C[i])+(1-Factor[i])*Vidya[i-1];
> > > }
> > >
> > > Plot(Vidya,"Vidya("+Length+")",styleLine);
> > > Plot(Factor,"Factor("+Length+")",styleLine);
> > >
> > > Thanks,
> > > Raja
> > >
> > >
> > >
> > >
> > >
> > > Please note that this group is for discussion between users only.
> > >
> > > To get support from AmiBroker please send an e-mail directly to
> > > SUPPORT {at} amibroker.com
> > >
> > > For other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > >
> > >
> > >
> > >
> > ------------------------------------------------------------------------
> > > YAHOO! GROUPS LINKS
> > >
> > >     *  Visit your group "amibroker
> > >       <http://groups.yahoo.com/group/amibroker>" on the
> > web.
> > >       
> > >     *  To unsubscribe from this group, send an email to:
> > >        amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > >     
> > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> > >       
> > >     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > >       Service <http://docs.yahoo.com/info/terms/>.
> > >
> > >
> > >
> > ------------------------------------------------------------------------
> > >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> >
> > 
> > 
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> >
> >
> > ________________________________
> > YAHOO! GROUPS LINKS
> >
> >  Visit your group "amibroker" on the web.
> >  
> >  To unsubscribe from this group, send an email to:
> >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >  
> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> >  To unsubscribe from this group, send an email to:
> >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> >  
> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> >  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> > ________________________________
> >
> >
>
>
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/ <http://e-wire.net.au/%7Eeb_kavan/>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
>
>
>
> SPONSORED LINKS
> Investment management software 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+management+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=f7GzIv9NJMWrH8f5eIxZQQ> 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+management+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=f7GzIv9NJMWrH8f5eIxZQQ> 
> 	Investment property software 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+property+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=fBbyjQAf07KrkKtKejJqSg> 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+property+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=fBbyjQAf07KrkKtKejJqSg> 
> 	Investment software 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=JfxNHYIXqCuLAnnc8YN4_A> 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=JfxNHYIXqCuLAnnc8YN4_A> 
>
> Investment tracking software 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+tracking+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=SgkrPC352yiiN_zJGzIM9Q> 
> <http://groups.yahoo.com/gads?t=ms&k=Investment+tracking+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=SgkrPC352yiiN_zJGzIM9Q> 
> 	Return on investment software 
> <http://groups.yahoo.com/gads?t=ms&k=Return+on+investment+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=L-DlQNXfuFeH8Mu0waS7qw> 
> <http://groups.yahoo.com/gads?t=ms&k=Return+on+investment+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=L-DlQNXfuFeH8Mu0waS7qw> 
> 	Stock investment software 
> <http://groups.yahoo.com/gads?t=ms&k=Stock+investment+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=0oBPv1BELuBmfls_PcSgGg> 
> <http://groups.yahoo.com/gads?t=ms&k=Stock+investment+software&w1=Investment+management+software&w2=Investment+property+software&w3=Investment+software&w4=Investment+tracking+software&w5=Return+on+investment+software&w6=Stock+investment+software&c=6&s=195&.sig=0oBPv1BELuBmfls_PcSgGg> 
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "amibroker
>       <http://groups.yahoo.com/group/amibroker>" on the web.
>        
>     *  To unsubscribe from this group, send an email to:
>        amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>        
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/DldnlA/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

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

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