Hi,
This might work, I use it in similar way.
Buy = something...;
for (i=0; i<barcount; i++) {
if (buy[i]) {
CategoryAddSymbol ( name(), categoryWatchlist, number);
}
}
You can adjust value of i for your requirment of bars.
Regards
--- In [email protected], "murthysuresh" <murthysur...@...>
wrote:
>
> No ideas???
>
> --- In [email protected], "murthysuresh" murthysuresh@ wrote:
> >
> > i add to watchlist in my scans using lastvalue(Buy)
> > however if i set my N last quotations >1 then it will not work
properly as the Buy signal could have been in a earlier bar. how can i
detect the value of the N last quotations and check for Buy signals
within the N last quotations and combine it with a if statement.
> > for eg this is my code which i need to convert to use the N last
quotations.
> >
> > if((LastValue(Buy)==1 )) {
> > CategoryAddSymbol("",categoryWatchlist, wlnumber)
> > }
> >
>