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

[amibroker] ELDER AUTO ENVELOPE



PureBytes Links

Trading Reference Links

Hi,

This is my first day in this group.Recently I've found the metastock
code for ELDER AUTO ENVELOPE.Can anyone plz convert it to AFL.Plz mail
me.Thanks
Regards

MS FORMULA

EMA:=Input("Base EMA",1,100,22);
Factor:=Input("Factor",1,50,27);
avg:=Mov(C,EMA,E);
csize:= Stdev(2*Max(Abs(H-avg) ,Abs(L-avg)) / avg,100)*Factor/10; 
{Use 100 days for stable channel size - default is 2.7 std}
Csize:= ValueWhen(1,
DayOfWeek()<Ref(DayOfWeek() ,-1) OR (
DayOfWeek()=Ref(DayOfWeek(),-1) AND DayOfMonth() <> Ref(DayOfMonth(),-1))
,Ref(csize,-1));
{ This pegs the Stdev to last bar of week  and only changes once per week}
csize:=LastValue(csize);
{fix to constant using last value}
channel:=csize*avg;
avg+channel/2;
avg-channel/2;
avg;




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/