PureBytes Links
Trading Reference Links
|
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
|