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

RE: [EquisMetaStock Group] Problem using barssince()



PureBytes Links

Trading Reference Links

Dear Robert,
 
The use of CUM(1) is quite helpful here:
 
First we set our condition.  This says that can tell us if today is the highest high:
todayyearhigh := H > Ref(HHV(H,253),-1);
 
Next we define daynum - this increments by 1 per bar on the chart. 
daynum := Cum(1);
 
Now we combine the two and check the difference between the daynums between different year highs:
ValueWhen(1,todayyearhigh,daynum) - ValueWhen(2,todayyearhigh,daynum);
 
Have a play with the formula - it does reset itself.  eg.  On GE, on both Thursday and Friday it has made two consecutive higher highs for the last year.  Therefore the above formulae now shows it as "1" because that's how it's defined.
 
Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK & USA -
 


From: robertagra@xxxxxxxxx [mailto:robertagra@xxxxxxxxx]
Sent: Saturday, 6 November 2004 7:22 AM
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group] Problem using barssince()



I would like to count the bars since the last new high.
I use HHV(H,253) to find a year-high and Ref(HHV(H,253),-1) to find
the year-high not including today.
Running the Explorer on 11/4 data GE made a year-high yesterday at
$35.09.  The previous year-high was (not including 11/4) was $34.57
on 1/28/04.
Does anyone know how to use barssince() to report the number of days
(bars) between these two values?
Or, is there another way to measure bars (days) between events or
bars between dates?

Thanks
Robert








Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links