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

[amibroker] Re: AFL - Syntax



PureBytes Links

Trading Reference Links

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