Sir, can you make swing pivot based scanner in hourly time frame?

Hello Nitin Sir,

Good evening,

Sir, can you make swing pivot based scanner in hourly time frame?

Buy- Buy entry third candle high

Sell- Sell entry third candle low

As per the above condition

Buy Script:

LAST > REF(HIGH,3)

Sell Script:

LAST < REF(LOW,3)