To calculate the volume weighted average price, you need to add up the price traded for every transaction (price x the number of shares traded). And after that divide by the total traded shares.