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

Re: watchlist and buy signals



PureBytes Links

Trading Reference Links

folks,
read below for context. 
"buy == exrem(1,0);" does in fact produce one and only one buy 
signal if the period is set to "all quotations" in the range box of 
the automatic analysis window. Is this because the beginning of the 
array is always the first element for all quotations regardless of 
the period set?? (i.e. even if you any of the other period options 
in the range box of the automatic analysis window)

If so, my question then becomes what is the best way to produce one 
and only buy signal for an arbitrary period for each stock in a 
watchlist as described in more detail below.

Thanx again,
Phil



--- In amibroker@xxxx, "techwatcher" <ppark@xxxx> wrote:
> 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