vwap
Volume-weighted average price
vwap() or vwap("1w")Session VWAP with vwap(). Weekly-reset VWAP (Pine time(W) on the chart timeframe) with vwap("1w"). Companion deviation: vwapsd("1w"). This is not vwap() on 1w — that would resample weekly bars.
Parameters
| Name | Type | Description |
|---|---|---|
resetoptional | string | Reset period. Omit for daily session VWAP. Use "1w", "1d", or Pine letters W / D. |
Return value
series
Example
plot vwap() as "Session VWAP" orange
plot vwap("1w") as "Weekly VWAP" blue
when close crosses above vwap() then buy