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?
 
Akshay: I'm using to a simple intraday stock scanner in Amibroker which generate signal based on High/Low breakout like this ... My problem is that in many cases signal papers on the chart after 8-10 bars has passed, any suggestions?

Your query is completely off-topic for this site! This site is about MetaTrader and MQL coding language.

Amibroker does not support MetaTrader and they use their own software with the AFL programming language, so I suggest you post your query on their website/forum!

Reason: