How many minutes in a trading day? Let's say it is 400
What is the interval of the chart? Assume 5 min
How many bars are in the trading day? 400/5=80, right?
If you want to avg the volume bars, take the current volume, the valume from 80*1 bars ago (yesterdays volume for the comparable time frame), plus the volume from 80*2 bars ago, plus 80*3 etc, then divide by the number of days you are looking back.
Thanks for the response. I actually have got it working and am overlaying the last n days avg cumulative volume over today's cumulative volume. I retrieved values by finding the correct bar offset for each trading day looking back n periods.
Comment