calculate average volume - AFL query

iTrade

Well-Known Member
#1
Hello Traders,

I want to calculate average volume across last 10 bars in Ambibroker for a
stock. Please help me with the formula for the same.


Thanks.
 

rinku4142

Active Member
#3
download this afl it will plot 10 day volume average on chart
 

iTrade

Well-Known Member
#4
average_volume=ma(v,10);
Thanks. I still have a question in the above formula. When you say ma(v,10), does 10 means 10 days ? I am actually looking for at an intraday chart and want to calculate average for last 5-10 bars or even last 10-30 seconds.
 
#5
Thanks. I still have a question in the above formula. When you say ma(v,10), does 10 means 10 days ? I am actually looking for at an intraday chart and want to calculate average for last 5-10 bars or even last 10-30 seconds.
the 10 means 10 units of whatever time scale you are using
if you are using minutes, its 10 minutes
days, 10 days
tick, 10 ticks
 

rinku4142

Active Member
#6
it is not 10 days average it is up to u whatever time frame you use it will show the average volume of custom bars