Could anyone pls post an afl to display weighted average price of the close.
Requirement: Only Intraday.
It is NOT average for a period of time like 20 period wt. moving average or 50 period wt.moving avegrage where the last 20 candles or 50 candles closing price would be considered for calculation.
The value should be weighted average of all the closing prices available in the data till that point of time.
* ODIN, IB Power, TT advance and almost all the softwares dispalys this wt average price along with open, high, low, close ( real time). ofcouse they diaplay Wt avg price at tick level, that is every trade ( price*volume) will be considered for calculation. But here we consider close*volume , that is closing price of tha minute * volume traded during that minute.
Time Close Volume Wt avg
9:01 100 5000 100
9:02 101 10000 100.66 ( (100*5000)+(101*10000)) / (5000+10000))
9:03 102 1200 100.76 ( (100*5000)+(101*10000) + (102*1200)) / (5000+10000+1200))
Hence this is continous calculation. At anypoint of time Weighted avgerage = ( Sum of Values traded till that point / total Volume )
Value traded = ( close * Volume )
Is there any available afl for this or if not can you please send the afl code to plot wt avg price on the chart ).