The formula used to calculate Volume-Weighted Average Price (VWAP) is: vwap = ((high + low + close) / 3 * volume) / volume