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

Re: [EquisMetaStock Group] Barssince in exploration



PureBytes Links

Trading Reference Links

Ron

> I'm using the following expression:
>
> Barssince(C<=3)>10
>
> I take this to mean that in the last 10 bars the ticker has been at least
3.
>
> That would lead to 1's and 0's appearing in the column.
>
> In many cases I'm getting N/A in the column. What is triggering that?
> What does it mean? I thought that the Barssince expression was truly
> boolean.

BarsSince() should be applied to an event (condition change) rather than
just a condition. There are two parts to the solution. First, you must make
your exploration scan more periods than the last 10 bars (which you are
probably already doing), and second, you should add an "initialisation"
event into the code. Cum(1)=1 is all that's required in this case. What it
does is it forces an event that BarsSince() can use as a reference point
when C<=3 doesn't.

The problem you are seeing is because N/A will be reported by any issue
where "C<=3" was never true during the scanned period.

This trick of using an initialisation signal is also useful with ValueWhen()
and one or two other functions. In most cases the value returned when the
init signal is given is quite irrelevant - what is relevant it that the N/A
period is eliminated or drastically reduced.

My example of..
BarsSince(Cum(1)=1 OR C<=3)>10;
is probably not going to deliver the result you are looking for - you will
need to modify the code for that. However use of "Cum(1)=1 OR" will address
the BarsSince failure that you have.

Roy



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges & Refill Kits for Your Epson at Myinks.com
Free shipping on orders $50 or more to the US and Canada.
http://www.c1tracking.com/l.asp?cid=5705&lp=home/epson.asp
http://us.click.yahoo.com/brYXfA/_xWGAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/