AFL(Amibroker) signal apperas after few bars

I'm using to a simple intraday stock scanner in Amibroker which generate signal based on High/Low breakout like this

H20 = Ref(HHV(C,1500),-1);
L20 = Ref(LLV(C,1500),-1);

LTP = Ref(C,0);

Buy =  LTP= H20  AND  (PDI(14) - MDI(14)) >25;
Sell = LTP<= L20  AND  (MDI(14) - PDI(14)) >25;

My problem is that in many cases signal papers on the chart after 8-10 bars has passed, any suggestions?