PureBytes Links
Trading Reference Links
|
Thanks Graham, I got it.
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> probably from copy/paste - either character mis pasted, or you have
> lines split from paste. I removed the comment parts in case it
wrapped
> from pasting
>
> WMA10 = WMA( Close, 10 );
> WMA20 = WMA( Close, 20 );
> Crosses = Cross( WMA10, WMA20) OR Cross( WMA20, WMA10 ) ;
> P4 = ValueWhen( Crosses, WMA10 );
> P3 = ValueWhen( Crosses, Ref( WMA10, -1 ) );
> P2 = ValueWhen( Crosses, Ref( WMA10, -2 ) );
> P1 = ValueWhen( Crosses, Ref( WMA10, -3 ) );
>
> On 8/10/05, cstdc5588 <cstdc5588@xxxx> wrote:
> > Thanks Graham,
> >
> > But still there is a syntax error in line 4. Could you please
tell
> > me how to correct it?
> >
> > Regards,
> >
> > Zewen.
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx>
wrote:
> > > just a matter of semi colons on ends of lines and counting
brackets
> > >
> > > WMA10 = WMA( Close, 10 ); // create 10pd WMA of Close
> > > WMA20 = WMA( Close, 20 ); // and 20 pd WMA
> > > Crosses = Cross( WMA10, WMA20) OR Cross( WMA20, WMA10 ) ; //
mark
> > bars
> > > with 10 crossing above 20 // and bars with 10 crossing below
20;
> > > P4 = ValueWhen( Crosses, WMA10 ); // value of WMA when cross
occurs
> > > P3 = ValueWhen( Crosses, Ref( WMA10, -1 ) ); // and 1 bar
before
> > cross
> > > P2 = ValueWhen( Crosses, Ref( WMA10, -2 ) ); // 2 bars before
> > > P1 = ValueWhen( Crosses, Ref( WMA10, -3 ) ); // 3 bars before
> > >
> > > On 8/10/05, zewen yang <cstdc5588@xxxx> wrote:
> > > >
> > > >
> > > >
> > > > Hi Marcin,
> > > >
> > > >
> > > >
> > > > I want to use AFL to calculate some P value on MA. Below is a
> > formula in
> > > > AFL.
> > > >
> > > >
> > > >
> > > > WMA10 = WMA( Close, 10 ); // create 10pd WMA of Close
> > > > WMA20 = WMA( Close, 20 ); // and 20 pd WMA
> > > > Crosses = Cross( WMA10, WMA20) // mark bars with 10 crossing
> > above 20
> > > > OR Cross( WMA20, WMA10 ) // and bars with 10 crossing below
20;
> > > > P4 = ValueWhen( Crosses, WMA10 ); // value of WMA when cross
> > occurs
> > > > P3 = ValueWhen( Crosses, Ref( WMA10, -1 ); // and 1 bar
before
> > cross
> > > > P2 = ValueWhen( Crosses, Ref( WMA10, -2 ); // 2 bars before
> > > > P1 = ValueWhen( Crosses, Ref( WMA10, -3 ); // 3 bars before
> > > >
> > > >
> > > >
> > > > There are several syntax errors in this formula, but I can't
> > solve them with
> > > > my little AFL knowledge.
> > > >
> > > > Could you please help me to solve this problem? Your help
would
> > be
> > > > appreciated.
> > > >
> > > >
> > > >
> > > > Best regards,
> > > >
> > > >
> > > >
> > > > Zewen
> > > >
> > > > 8/9/05
> > > >
> > > > ________________________________
> > > > Start your day with Yahoo! - make it your home page
> > > >
> > > > 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 Investment property software
> > Investment
> > > > software
> > > > Investment tracking software Return on investment software
Stock
> > investment
> > > > software
> > > > ________________________________
> > > > 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
> > > AB-Write >< Professional AFL Writing Service
> > > Yes, I write AFL code to your requirements
> > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hklo5hi/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1123668384/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
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/
|