Find volume average

what I learned from tradescript help is that

REF(VOLUME,1) refers previous days volume … is this true?

REF(VOLUME,2) refers volume 2 days back

can I use this primitive to find 10 days average volume ?

please give me a detailed answer.

REF(VOLUME,1) refers the previous candle volume, if you are using day candle time frame the previous candle would be previous day, If you are using 5 min time frame REF(VOLUME,1) would be previous 5min candle volume.

Similarly REF(VOLUME,2) or REF(VOLUME,10)

thank you for right information

Is that VOLUME function work for 1 minute candle too or only for 5 min chart?
I used VOLUME > REF(VOLUME, 1) * 20 to get the stocks which have 20 times surge in volume than previous 1 minute candle but it is giving false signals.
I want to get signals at the close of the candle for 1 minute chart?
Can you please help me how to get this done?

Thanks in advance,