Is EA backtest accurate?

There a problems when i backtest my EA.
I have a function that adjust the Stop loss to breakevent when profits/pips + 20. example when pips +20, adjust SL to breakevent/open price.
after that backtest, i open the chart and check, there is some trade, the profits do reach over + 20 pips, but some how it did not do any modify trade, and some others it do modify the trade.

Is there any one know why? or the back test is not accurate?
or possible the EA got bug?

sorry, is the coding error for sell order

if((Ask + OrderOpenPrice() < Point * BE_Adjust_AT_Profits)&& ( OrderStopLoss()- OrderOpenPrice() > Point * StopLoss))

change to

if(( OrderOpenPrice()-Ask > Point * BE_Adjust_AT_Profits)&& ( OrderStopLoss()- OrderOpenPrice() > Point * StopLoss))