Please provide PI script for stock price movement in Consolidation phase?

As per the above condition 

REF(HIGH,2)=REF(HIGH,1) AND REF(LOW,2)=REF(LOW,2)

Can you explain in detail?

For example-- I need script for last five “2=minute candlesticks” have approximately same highs and approximately same lows