Sidechair

ta.vwap

Browse the reference

The session volume-weighted average price of hlc3, restarting at the start of every trading session.

Try it in the editor

ta.vwap is a series variable. It adds hlc3 * volume and volume from the first bar of the session and divides one total by the other, so each bar's value is the average price paid so far that session, weighted by volume.

At the first bar of each session the total restarts. Use the function form ta.vwap(source, anchor) to choose a different source or restart condition.

Type

series float

Remarks

  • On Sidechair: the session is the chart's own market session, a New York trading day for US stocks and a UTC day for crypto.
  • Symbols with no volume return na.

Example

Pine ScriptSession VWAP with the closeOpen in editor
//@version=6
indicator("Session VWAP", overlay = true)
plot(ta.vwap, "VWAP", color = color.orange, linewidth = 2)
plot(close, "Close", color = color.new(color.gray, 50))

See also

Runs on Sidechair