Want only the first occurance

I have an AFL which puts signal only on today's chart from 9:15 am to 9:45 am.
During this timeslot, for some cases there could be multiple signals, I want only the first signal and ignore other signals for plotting on the chart.

With Lastvalue(valuewhen(..)) we can find the last occurrence, how do we get the 1st occurrence of the day. Please suggest.
Here is the code :

SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
pk1=Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2) AND Hour()==9 AND Minute()>22 AND Minute()<52;

o1=Ref(o,-2);
c1=Ref(c,-2);
h1=(o1+c1)/2;
cond=Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2) AND Hour()==9 AND Minute()<52 AND Minute()>18 AND Datenum()==Now(3);
PlotShapes(IIf(cond, shapeCircle, shapeNone),colorwhite, 0,h1,yoffset=0,XShift=-2);

I would suggest using ExRem().

it worked.
Thank you.