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

[amibroker] Re: Need help with Explore code



PureBytes Links

Trading Reference Links


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


--- In amibroker@xxxxxxxxxxxxxxx, Alan Northam <anortham@xxxx> wrote:
> Eugene,
> 
> Thanks for the code.  Being new to AFL  can you explain what the 
filter 
> does?  Why use the SUM syntax and what does the ==30 do.  I want to 
> understand the logic.
> 
> Thanks,
> Alan
> 
> At 11:57 AM 11/5/04 +0000, you wrote:
> 
> 
> >st=ema(c,10);
> >lt=ema(c,20);
> >filter=sum(st>lt,30)==30;
> >
> >--- In amibroker@xxxxxxxxxxxxxxx, "alannortham" <anortham@xxxx> 
wrote:
> > >
> > > Thanks wrzec for the help.  It is working.
> > >
> > > I also want to scan for stocks where the short term moving 
average
> > > has been above the longer term moving average for the last 30 
days.
> > > Can anyone provide the code to do this?
> > >
> > > Alann,
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, wrzec <wrzecha1@xxxx> wrote:
> > > > You are correct. The filter should be
> > > >
> > > > Filter=Cross(WklyMA1_d,WklyMA2_d);
> > > > Sorry for the mistake.
> > > > wrzec
> >
> >
> >
> >
> >
> >
> >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
> >
> >
> >
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/