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

[amibroker] Please Help: MA Ribbon Formula



PureBytes Links

Trading Reference Links

Dear All,

Please help me to convert this Metastock formula to AFL.
Moving average ribbon:

Periods := Input("Time Periods", 1, 1000, 20);
Spacing := Input("Spacing", 1, 100, 5);
Ribbons := Input("Ribbons", 1, 12, 12);
BaseMA := Mov(C,Periods+(Spacing*0),S);

If(Ribbons>=2,Mov(C,Periods+(Spacing*1),S),BaseMA);
If(Ribbons>=3,Mov(C,Periods+(Spacing*2),S),BaseMA);
If(Ribbons>=4,Mov(C,Periods+(Spacing*3),S),BaseMA);
If(Ribbons>=5,Mov(C,Periods+(Spacing*4),S),BaseMA);
If(Ribbons>=6,Mov(C,Periods+(Spacing*5),S),BaseMA);
If(Ribbons>=7,Mov(C,Periods+(Spacing*6),S),BaseMA);
If(Ribbons>=8,Mov(C,Periods+(Spacing*7),S),BaseMA);
If(Ribbons>=9,Mov(C,Periods+(Spacing*8),S),BaseMA);
If(Ribbons>=10,Mov(C,Periods+(Spacing*9),S),BaseMA);
If(Ribbons>=11,Mov(C,Periods+(Spacing*10),S),BaseMA);
If(Ribbons>=12,Mov(C,Periods+(Spacing*11),S),BaseMA);



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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

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