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

RE: [amibroker] Re: Need help with Explore code



PureBytes Links

Trading Reference Links

Alann,
You wouldn't need the last value of Sum
[Var=LastValue(Sum(stema>ltema,Days));] if  you  selected 'n last
quotations' [or 'n last days'] =1.
Good idea also to add 'debugging' column.
-----
stema=EMA(Close,7);
ltema=EMA(Close,35);
Days=30;
s30 =Sum(stema>ltema,Days);
Var=LastValue(s30);
Filter=Var==Days;
AddColumn(Var,"var");
AddColumn(s30,"s30"); // same if n =1

AddColumn(stema,"stema"); // check
AddColumn(ltema,"ltema"); // check
-----

Regards,
Bob


-----Original Message-----
From: alannortham [mailto:anortham@xxxxxxx]
Sent: Friday, November 05, 2004 1:12 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Need help with Explore code




Got it!  It's set for "Daily".

Thanks,
Alann

--- In amibroker@xxxxxxxxxxxxxxx, "Bob Jagow" <bjagow@xxxx> wrote:
> The AA Settings Tab is labeled Backtester. The Periodicity you
choose
> applies not only to Back Test  but also to Scan and Explore.
>
> Regards,
> Bob
>
>
> -----Original Message-----
> From: alannortham [mailto:anortham@x...]
> Sent: Friday, November 05, 2004 12:35 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Need help with Explore code
>
>
>
>
> Hi Bob,
>
> Thanks for encouragement.  I am new to AMIBroker and have not got so
> far as to try backtesting so when you say check your backtested
> periodicity setting I do not know what that means, YET!  Can you
> explain?  Maybe this will be my start into backtesting.
>
> Thanks,
> Alann
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Bob Jagow" <bjagow@xxxx> wrote:
> > The formula is correct.
> > Check your Backtester periodicity setting.
> >
> > Regards,
> > Bob
> >
> >
> > -----Original Message-----
> > From: alannortham [mailto:anortham@x...]
> > Sent: Friday, November 05, 2004 11:02 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Need help with Explore code
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Bill Barnard" <wbarnard@xxxx>
> > wrote:
> > >
> > > --- 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
> >
> > Thanks Bill for the response and for the code improvement.  Adding
> > the AddColumn gets rid of the error message however, when I run
the
> > scan it lists stock tickers who's short term ema is above the
longer
> > term ema as well as stock tickers who's long term ema is above the
> > short term ema.  There still needs to be some code improvement so
> > that only the stock tickers are listed who's short term ema is
> > currently above the long term ema and has been for at least the
last
> > 30 day's.  Any ideas?
> >
> > Alan
> >
> >
> >
> >
> >
> >
> > 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
>
>
>
>
>
>
> 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






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 --------------------~--> 
$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/