Need strategy coding for overnight gaps

I need a simple strategy to find overnight gaps for past 7 days, up or down where my conditions would be as follows.

up gaps:

today Low > Previous day high
today volume > 1.5 times Previous day volume

down gaps:
today high < Previous day low
today volume > 1.5 times Previous day volume

Can anyone make a code for this?

As per the above condition ( use daily charts)

Buy Script:

LOW>REF(HIGH,1) AND VOLUME>(REF(VOLUME,1))*1.5

Sell Script:

HIGH<REF(LOW,1) AND VOLUME>(REF(VOLUME,1))*1.5