I don’t see anything wrong here.

Trades are never entered during the lookback period or out of frame.