Standard EA code is not working in back test

Hi All
,

I am trying to test standard EA code giving by Zerodha (Bollinger Band Penetration system) using back test functionality but it is not giving correct results.

Below is standard code for Sell and I am testing on 5 mins candle for Nifty futures of current month.  It is suppose to generate sell signal yesterday after 9:30:00 AM but did not provide any signal. I am also attaching screen shot, look into this.

Standard EA code for sell:

SET T = BBT(CLOSE, 20, 2, EXPONENTIAL)
((REF(T, 1) < REF(CLOSE, 1) AND T > CLOSE) OR ((REF(T, 2) < REF(CLOSE, 2) AND T > CLOSE) OR ((REF(T, 3) <

REF(CLOSE, 3) AND T > CLOSE) OR ((REF(T, 4) < REF(CLOSE, 4) AND T > CLOSE) OR ((REF(T, 5) < REF(CLOSE, 5)

AND T > CLOSE)

Regards
Shiva

In Pi the Expert Advisors the alerts are generated at signals on the live market LTP. where as in backtest it check with the close of the candle on the historical data of the OHLC values, also in backtest the buy signal follows with sell signal and vise versa, so there might be difference in the results.

Thanks for the reply. I am aware of the fact what you told but in my case it is first signal in back testing and the code is checking based on OHLC of the candle. Still it is not giving correct results.