What will be cod to get alert when volume bebome 2x or 5x in the last 10 candle

As per the above query you can refer with previous candle as 

VOLUME > 2*(REF(VOLUME,1))

gives when volume is 2x with previous candle