TWAP is calculated by taking average of Open, High, Low and Close price of each bar, and then calculating the average of these averages for ‘n’ number of periods . For Ex: if you want TWAP value for 10 periods, then: Take Average of Open, High, Low and Close values of each individual 10 bars.