Frustrated by dealing with intraday volumes, and the impossibility to have a reliable moving average, I coded this MA based on the volumes recorded at the same time of previous trading days. The code returns the average of the same time for the previous “d” days (in black) and a 1 sigma deviation up and down (in blue).
Blue skies!!
somma=0
//computation of average
delta=round(highest[144](intradaybarindex)+1)
for i=1 to p
somma=somma+volume[i*delta]
next
fin=somma/p
//computation of standard deviation
sc=0
for i=1 to p
sc=sc+sqr(volume[i*delta]-fin)
next
scar=sqrt(sc/p)
return fin,fin+scar coloured (0,150,255), max(0,fin-scar) coloured (0,150,255)