Check the timestamp

A test enters at a candle’s opening price but uses that same candle’s closing price to decide whether to enter.

What is the first problem?