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

[amibroker] Re: Need help with Explore code



PureBytes Links

Trading Reference Links


--- In amibroker@xxxxxxxxxxxxxxx, "alannortham" <anortham@xxxx> wrote:
> 
> I tried the following code which is suppose to filter my stocks
when 
> the short term ema is above the longer term ema for the last 30 
> days.  However when I run it, it gives an error message saying I
need 
> to define a NumColumn variable.  I know how to add a new column but
I 
> am not sure what the array needs to be.  Can anyone help me get
this 
> code working?
> 
> <==Start Code==>
> st=ema(c,10);
> >lt=ema(c,20);
> >filter=sum(st>lt,30)==30;
> <==End Code==>
> 
> Thanks,
> Alan



Hi Alan,

Try this:

st=EMA(C,10);
lt=EMA(C,20);
Filter=Sum(st>lt,30)==30;
AddColumn(C, "Close");


Bill





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/