In trading there is a thing called "Slippage", thats why the close price of a trade is not the same as the close of the candle, and can be of course higher or lower than the last candles high or low.

If you dont want to simulate the effect of slippage in the backtest, set Slippage = 0.