How to calculate the average value of a bar from the ticks?

I want to calculate the average value of a bar from the ticks is contained in that bar.
My Database with tick (Price, Vol), now I make a Trading System base on time frame 5-mins. I want to know average value of bars (SUM(Price * Vol) / SUM(Vol)). But I don't know how to do.

Please help me!

Thank you so much!

Look here, for example

2 Likes

Thank you so much!

Base on your introduced, I have done!