With the small dataset you have given, going through it manuially, using the code as I have posted previously, these are the results I get:
1 05/30/2008 09:59:000 85.0000 90.0000 85.0000 90.0000 FIRST BAR NULL
2 05/30/2008 10:00:000 95.0000 96.0000 95.0000 95.0000 newDay
3 05/30/2008 10:01:000 95.0000 105.000 95.0000 100.000 highestHigh << first new highestHigh on this day
4 05/30/2008 10:02:000 100.000 100.000 85.0000 85.0000
5 05/30/2008 10:03:000 85.0000 90.0000 85.0000 90.0000
6 05/30/2008 10:04:000 90.0000 105.000 90.0000 95.0000
7 05/30/2008 10:05:000 95.0000 95.0000 85.0000 90.0000
8 06/02/2008 09:59:000 90.0000 95.0000 90.0000 95.0000 newDay
9 06/02/2008 10:00:000 100.000 101.000 100.000 100.000 highestHigh << first new highestHigh on this day
10 06/02/2008 10:01:000 100.000 110.000 100.000 105.000 highestHigh
11 06/02/2008 10:02:000 105.000 105.000 90.0000 90.0000
12 06/02/2008 10:03:000 90.0000 95.0000 90.0000 95.0000
13 06/02/2008 10:04:000 95.0000 110.000 95.0000 100.000
14 06/02/2008 10:05:000 100.000 100.000 90.0000 95.0000
so the function should be returning TRUE values on bars 3 and 9, FALSE otherwise. The reason that bar 2 is not captured is because of the NULL first bar.
Changing the code to use the external function to remove the NULL first bar, and trap the first counter gives results same as the manual identification of bars as follows:
1 05/30/2008 09:59:000 85.0000 90.0000 85.0000 90.0000 newDay
2 05/30/2008 10:00:000 95.0000 96.0000 95.0000 95.0000 first highestHigh << first new highestHigh on this day
3 05/30/2008 10:01:000 95.0000 105.000 95.0000 100.000 new highestHigh
4 05/30/2008 10:02:000 100.000 100.000 85.0000 85.0000
5 05/30/2008 10:03:000 85.0000 90.0000 85.0000 90.0000
6 05/30/2008 10:04:000 90.0000 105.000 90.0000 95.0000 revisit highestHigh
7 05/30/2008 10:05:000 95.0000 95.0000 85.0000 90.0000
8 06/02/2008 09:59:000 90.0000 95.0000 90.0000 95.0000 newDay
9 06/02/2008 10:00:000 100.000 101.000 100.000 100.000 first highestHigh << first new highestHigh on this day
10 06/02/2008 10:01:000 100.000 110.000 100.000 105.000 new highestHigh
11 06/02/2008 10:02:000 105.000 105.000 90.0000 90.0000
12 06/02/2008 10:03:000 90.0000 95.0000 90.0000 95.0000
13 06/02/2008 10:04:000 95.0000 110.000 95.0000 100.000 revisit highestHigh
14 06/02/2008 10:05:000 100.000 100.000 90.0000 95.0000
Code:{identify the start of the trading day, or start of chart}
newDay:=ExtFml("Forum.Sum",DayOfMonth()<>Ref(DayOfMonth(),-1),1) OR Cum(1)=1;
{find the highest high so far this trading day}
highestHigh:=HighestSince(1,newDay,H);
{find a new highest high}
hh:=ExtFml("Forum.sum",H>Ref(HighestHigh,-1),1) OR newDay;
{count and reset}
count:=Cum(hh);
reset:=newDay;
counter:=count - ValueWhen(1,reset,count);
{signal/alert}
counter=1 AND Alert(counter<>1,2);
If this doesn't work for you, let me know.
wabbit [:D]