All indicators
Volume / Price pane

VWAP

Session volume-weighted average price that starts fresh on every New York trading date.

  • VWAP
  • Built into Spectral
  • Updates every tick
  • Uses volume
  • vwap
  • volume weighted
  • intraday
  • session
  • fair price

By Spectral · v1.0.0

MIT-0: free to use, change and share, no attribution needed. What you build from it is yours.

Already in Spectral: add it from the Indicators toolbox. The file here is the same indicator written as a custom indicator, to change or learn from. Installed, it appears next to the built-in one, marked Custom.

VWAP on a Spectral chart
Spectral chart with sample market data, default settings.

Overview

VWAP is the session average of the typical price (high + low + close) / 3, weighted by each bar's volume. Bars with more volume pull the line harder. It resets at the start of every New York trading date.

How to read it

Price holding above a rising VWAP can indicate intraday strength; price holding below a falling VWAP can indicate weakness. Retests can be useful context: the slope and whether price accepts or rejects the line matter more than a momentary cross.

Many intraday traders treat VWAP as the fair price of the session, so it often acts as a magnet or a reference for entries.

Settings and limitations

There is nothing to set. VWAP needs volume; it stays empty until the first bar of the session with volume. Use it on intraday bar sizes; on daily or larger bars each bar is its own session.

Notes

Computes the same values as the built-in VWAP in Spectral, including pre-market and after-hours bars when the chart shows them.

What it draws

Lines

  • VWAPsolid · 1.5 px · primary#8AA9C3

Source

Save it as vwap.js and add it with Indicators → Custom indicators → Add file…. The format is explained in the custom indicators guide.

// Copyright (c) 2026 Spectral
// SPDX-License-Identifier: MIT-0
// Free to use, copy, modify and share: https://spectral.trade/docs/custom-indicators/LICENSE.txt
/** @type {import('./spectral-indicator').IndicatorV1} */
export default {
  schemaVersion: 1,
  id: 'vwap',
  name: 'VWAP',
  shortName: 'VWAP',
  version: '1.0.0',
  author: 'Spectral',
  description: 'Session volume-weighted average price that starts fresh on every New York trading date.',
  pane: 'price',
  live: { lookback: 0 },
  usesVolume: true,
  plots: {
    vwap: { label: 'VWAP', color: '#8AA9C3', lineWidth: 1.5, primary: true },
  },
  docs: {
    overview: 'VWAP is the session average of the typical price (high + low + close) / 3, weighted by each bar\'s volume. Bars with more volume pull the line harder. It resets at the start of every New York trading date.',
    howToRead: 'Price holding above a rising VWAP can indicate intraday strength; price holding below a falling VWAP can indicate weakness. Retests can be useful context: the slope and whether price accepts or rejects the line matter more than a momentary cross.\n\nMany intraday traders treat VWAP as the fair price of the session, so it often acts as a magnet or a reference for entries.',
    settings: 'There is nothing to set. VWAP needs volume; it stays empty until the first bar of the session with volume. Use it on intraday bar sizes; on daily or larger bars each bar is its own session.',
    notes: 'Computes the same values as the built-in VWAP in Spectral, including pre-market and after-hours bars when the chart shows them.',
  },
  calculate(ctx) {
    return { plots: { vwap: ctx.ta.sessionVwap(ctx.bars) } };
  },
};

Adapt it with an LLM

Paste this into your assistant and replace the second-to-last line with the change you want.

Start from this Spectral custom indicator: https://spectral.trade/indicators/vwap.js
Format reference: https://spectral.trade/docs/custom-indicators.llm.md
Keep the file format and every rule of the reference; give the result a new id, name, shortName and version, and update docs and input descriptions to match.
Keep its live updates exact and fast (section "Fast live updates" of the reference): carry values from bar to bar only through ctx.ta, and raise live.lookback if the change reads further back; Spectral rejects a file whose live updates differ from a full recalculation or are too slow.
Change I want: <describe the change>
Answer with the complete file in one code block, ready to save as <id>.js.