However, note that you will receive the notification from the scanner after 1min post 2nd 5min candle completion. This is because we need 1 additional candle after the Nth candle formation.
Pre-market is only available in scanner and not in a strategy since you cannot verify this on a historical candlestick chart.
Gap up or down happens quite often, so unless the current day (Open) = Previous day (Close), it will consider a gap up or down. if there is a certain point or percentage difference that you want to avoid,
You can write something like
Nth Candle (Open,5min) up by 0.25% from Previous N(Close, Day, -1)