Need code for first long candle then a small candle

I want a code for following to scan in real time…

Last Candle ( High - Low ) > Next Candle ( High - Low )

Means first candle is long candle then immediate next candle to it is small candle. It can be a red or green candle doesn’t matter

hElLO tRaDeR,

SCRIPT:

REF(HIGH,1) - REF(LOW,1) > HIGH - LOW

Thanks for Answer… It works when back tested on lower than 30 min candles… why not working for 30 min candle ?

Did you try increasing the back-test days ?