VWAP is computed by taking the sum of the product of each trade’s price and size (i.e., trade price × trade volume) within the 1-minute interval, and dividing that by the total traded volume in that same interval. This provides a time-specific average price that accounts for trade size, offering a more accurate reflection of market activity than a simple average. The TWAP users the time-weighted average of the “close” price for each 1-minute candle. We use the close price because it’s the last traded price for that minute, which provides as consistent price that matches the minute’s end as closely as possible.