PureBytes Links
Trading Reference Links
|
Hi,
This functionality will be provided by Status() function
that will return a start/end date/bar of the analysis period.
Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com
----- Original Message -----
From: "techwatcher" <ppark@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, September 30, 2001 8:06 PM
Subject: [amibroker] Re: watchlist and buy signals
> Tomasz,
>
> It might be useful to provide a function which would produce a
> signal at the beginning of the time period specified in the range
> box of automatic analysis. This would allow writing more portable
> code. I have seen at least one other posting where it perceived as
> desireable to separate out the explore phase from the backtest phase
> and this kind of function would allow easier testing of a watchlist
> of symbols that represented the result of an arbitrary filter. The
> function could be something like
>
> gensignal(type,range_option)
> where type is a constant;type =1(buy), type=2(sell), type=3(cover),
> etc and range_option specifies the particular radio button to use in
> the range section of the automatic analysis dialog box.
>
> What do you think??
>
> Thanx,
> Phil
>
> --- In amibroker@xxxx, "Tomasz Janeczko" <amibroker@xxxx> wrote:
> > Hello,
> >
> > The method you describe works if you set backtesting
> > range to "All quotations".
> > buy = 1; buy = exrem( buy, 0 );
> > does generate the array of single "1" at the beginning
> > of the data series (similarly to buy = cum(1) == 1)
> > but if you are using date ranges this signal
> > occurs outside of testing range, therefore you get
> > an empty trade list.
> >
> > A workaround to this problem is to use datenum() function.
> > If you for example want to generate a single buy signal
> > on March 7, 1999 you should write:
> >
> > buy = datenum() == 990307;
> >
> >
> > Best regards,
> > Tomasz Janeczko
> > ===============
> > AmiBroker - the comprehensive share manager.
> > http://www.amibroker.com
> >
> >
> > ----- Original Message -----
> > From: "techwatcher" <ppark@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Saturday, September 29, 2001 10:41 PM
> > Subject: [amibroker] watchlist and buy signals
> >
> >
> > > Folks,
> > >
> > > I just registered yesterday, but have looked at the documentation
> > > and some other postings so bear with me.
> > >
> > > Let's suppose that I have developed a filter for producing a set
> of
> > > stocks from a universe, but it does not do quite what I want. So,
> > > I "Explore" (using automatic analyser) the filter and then copy
> the
> > > list of stocks in the "explore" result into a watchlist. I then
> > > manually remove the stocks from the watchlist whose charts I
> don't
> > > like. Now, I want to backtest the remaining stocks by selecting
> the
> > > filter button on the automatic analyser dialog box. In this
> > > scenario, I would like to buy each stock once at the beginning of
> > > the test period and let them run for up to two weeks or exit
> before
> > > according to some exit criteria. Now I thought that I could use
> the
> > > exrem function to produce a buy signal for each stock on the
> first
> > > bar (or day) only in the following manner:
> > >
> > > buy = exrem(1,0);
> > >
> > > /* I am assuming that the above produces array1=[1,1,1,1,...] and
> > > array2=[0,0,0,0,...] and that therefore buy=[1,0,0,0...] --
> maybe
> > > this is my problem??? */
> > >
> > > sell= <some condition>;
> > >
> > > However, this seems to produce the empty set on hitting the scan
> > > button in the analyser. What is the best way to produce a buy
> signal
> > > on just the first day for each stock in my watchlist?
> > >
> > > (PS:I know that I have set up the watchlist and filter correctly
> in
> > > the automatic analyser because "buy=1" produces a buy signal
> > > everyday for all of the stocks in my watchlist)
> > >
> > > thanx,
> > > Phil
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
|