TP and SL not being hit on a few random trades

I’ve seen that before too. It could just be bad data. I think a possible workaround is to just exit after x amount of bars.