Overview
VWAP (Volume Weighted Average Price) is the benchmark against which institutional traders measure their execution quality. Unlike simple moving averages that weight all prices equally, VWAP weights each price by the volume traded at that level, revealing the true average price paid by all market participants. This makes VWAP one of the most important indicators for day traders who want to understand institutional flow and behavior.
When a portfolio manager instructs a trader to buy 100,000 shares of a stock, the trader's performance is typically measured against VWAP. If they execute below VWAP, they outperformed; above VWAP, they underperformed. This creates predictable institutional behavior: buying pressure below VWAP (seeking better-than-benchmark execution) and selling pressure above VWAP (seeking better-than-benchmark sells). Understanding this dynamic gives retail traders insight into likely institutional reactions at VWAP levels.
Anchored VWAP extends this concept by allowing traders to calculate VWAP from any user-specified starting point. Instead of resetting each session, Anchored VWAP can begin from earnings releases, swing highs or lows, Fed announcements, or any significant event. This reveals the average price paid since that event, providing context that standard VWAP misses.
Key Benefits
- Trade with the same benchmark institutions use for execution quality
- Identify intraday trend direction: above VWAP is bullish, below is bearish
- Use standard deviation bands to identify overextended price moves
- Anchor VWAP to significant events for multi-day reference levels
How VWAP is Calculated
VWAP is calculated by dividing the cumulative sum of (Price x Volume) by the cumulative sum of Volume. The "typical price" used is usually the average of High, Low, and Close for each bar, though some implementations use just the Close.
VWAP = Cumulative(Typical Price x Volume) / Cumulative(Volume)
Where Typical Price = (High + Low + Close) / 3
This running calculation means that early bars in a session have more impact on VWAP than later bars (because they establish the initial cumulative values). As the day progresses and cumulative volume grows large, VWAP becomes increasingly stable and moves more slowly. By the end of the session, VWAP often barely moves even with significant price swings.
Standard Deviation Bands
VWAP bands show how far price has deviated from VWAP in standard deviation increments. The calculation uses the volume-weighted variance of prices from VWAP. One standard deviation above and below VWAP captures approximately 68% of price action under normal distribution assumptions. Two standard deviations capture approximately 95%.
In practice, prices reaching the 2nd standard deviation band are statistically extended and often mean-revert back toward VWAP. The 3rd deviation band is extremely rare and typically only touched during major news events or panic moves. These extreme touches often mark short-term tops or bottoms.
Anchored VWAP
Anchored VWAP calculates Volume Weighted Average Price from any user-specified bar rather than from the session open. This powerful variation allows traders to see the average price paid by all participants since a significant event, providing context that spans multiple sessions.
Common Anchor Points
Earnings Announcements: Anchor VWAP to the bar after earnings to see the average price paid since the earnings reaction. If price is above this anchored VWAP, post-earnings buyers are in profit on average; if below, they are underwater.
Swing Highs/Lows: Anchor to significant swing points to see the average price since that pivot. Price returning to test an anchored VWAP from a swing low often finds support as average buyers defend their positions.
Gap Opens: Anchor to gap-up or gap-down opens to track the average price since the gap event. This helps identify whether gap buyers/sellers are still in profit or have become trapped.
Month/Quarter Start: Anchoring to the start of a new month or quarter captures the average price for all participants during that accounting period, relevant for funds that mark positions monthly or quarterly.
Multiple Anchors
Advanced traders often display multiple anchored VWAPs simultaneously. For example, you might show anchored VWAPs from the last earnings, the recent swing high, and the month start all on one chart. Where these levels cluster provides especially strong confluence.
Professional VWAP Suite
Multiple anchored VWAPs, auto-detection of significant events, band alerts, and developing VWAP visualization.
Trading with VWAP
Trend Identification
The simplest VWAP application is trend identification. When price is trading above VWAP, the intraday trend is bullish: buyers who entered today are, on average, in profit. When price is trading below VWAP, the trend is bearish: today's buyers are, on average, underwater. This simple filter improves trade selection by aligning with the intraday trend.
VWAP Pullback Strategy
In a bullish intraday trend (price above VWAP), buy pullbacks to VWAP. Institutions looking to buy at or below VWAP provide natural support at this level. Enter when price touches VWAP and shows a rejection candle (long lower wick, bullish engulfing). Place stops below VWAP and target the prior swing high or upper deviation band.
In a bearish intraday trend (price below VWAP), sell rallies to VWAP. Institutions looking to sell at or above VWAP provide natural resistance. Enter when price tests VWAP from below and shows rejection. Target the prior swing low or lower deviation band.
Deviation Band Mean Reversion
When price reaches the 2nd or 3rd standard deviation band, it is statistically overextended. Look for reversal signals (candlestick patterns, order flow exhaustion) to fade the move back toward VWAP. This works best in range-bound conditions rather than strong trending days.
VWAP as Support/Resistance
The first test of VWAP after an extended move often produces a reaction. After a strong morning rally, the first pullback to VWAP frequently bounces. After a morning selloff, the first rally to VWAP frequently rejects. These "first touches" of VWAP are high-probability trading opportunities.
Trading Rules
- Bullish bias: Only take longs when price is above VWAP. Use VWAP as support for entries.
- Bearish bias: Only take shorts when price is below VWAP. Use VWAP as resistance for entries.
- Mean reversion: Fade extreme moves at 2nd deviation bands back toward VWAP.
- Trend days: On strong trend days, price may not return to VWAP until late in the session. Respect the trend.
- Confluence: VWAP confluent with Volume Profile POC or pivot points creates stronger levels.
NinjaScript Implementation
The following code demonstrates a basic VWAP implementation with standard deviation bands in NinjaScript. This example shows the core calculation logic for VWAP and one standard deviation band.
namespace NinjaTrader.NinjaScript.Indicators
{
public class VWAPBands : Indicator
{
private double cumulativeTPV; // Typical Price x Volume
private double cumulativeVolume;
private double cumulativeTPV2; // For variance calculation
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = "VWAP with Standard Deviation Bands";
Name = "VWAPBands";
Calculate = Calculate.OnBarClose;
IsOverlay = true;
AddPlot(Brushes.Cyan, "VWAP");
AddPlot(Brushes.Gray, "Upper1");
AddPlot(Brushes.Gray, "Lower1");
}
}
protected override void OnBarUpdate()
{
// Reset at session start
if (Bars.IsFirstBarOfSession)
{
cumulativeTPV = 0;
cumulativeVolume = 0;
cumulativeTPV2 = 0;
}
double typicalPrice = (High[0] + Low[0] + Close[0]) / 3;
double volume = Volume[0];
cumulativeTPV += typicalPrice * volume;
cumulativeVolume += volume;
cumulativeTPV2 += typicalPrice * typicalPrice * volume;
if (cumulativeVolume == 0) return;
double vwap = cumulativeTPV / cumulativeVolume;
Values[0][0] = vwap;
// Standard deviation calculation
double variance = (cumulativeTPV2 / cumulativeVolume) - (vwap * vwap);
double stdDev = Math.Sqrt(Math.Max(variance, 0));
Values[1][0] = vwap + stdDev; // Upper 1 SD
Values[2][0] = vwap - stdDev; // Lower 1 SD
}
}
}
To implement Anchored VWAP, modify the reset logic to trigger from a user-specified bar index or time rather than session start. Add parameters allowing the user to click on a bar to set the anchor point.
Settings and Configuration
Configuring VWAP correctly ensures it provides relevant information for your trading style and markets.
Session Reset Time
For equities, VWAP typically resets at the market open (9:30 AM ET). For 24-hour futures markets, you can choose to reset at RTH open, midnight, or the globex open. Most day traders use RTH open (9:30 AM ET for ES/NQ) as this captures the session most relevant to institutional benchmarking.
Number of Bands
Most traders display 2 standard deviation bands above and below VWAP (4 bands total). Some add a 3rd deviation for extreme moves. Too many bands clutters the chart; too few misses important levels.
Price Type
The standard formula uses Typical Price (HLC/3). Some implementations offer alternatives like OHLC/4 or just Close. Typical Price is most common and recommended for consistency with institutional benchmarks.
Developing vs Fixed
"Developing" VWAP shows the current session's VWAP updating in real-time. "Fixed" or historical VWAP shows where VWAP ended in prior sessions. Displaying prior day VWAP close as a static line provides an additional reference level.
Weekly/Monthly VWAP
Some traders use longer-period VWAP that resets weekly or monthly rather than daily. These provide broader context about institutional positioning over longer timeframes and are useful for swing traders.
Frequently Asked Questions
What is VWAP and how is it calculated?
VWAP (Volume Weighted Average Price) is calculated by dividing the cumulative (price x volume) by cumulative volume. It represents the average price paid by all traders weighted by volume, making it a key institutional reference level that resets each trading session.
What is Anchored VWAP?
Anchored VWAP calculates VWAP from a user-specified starting point rather than the session open. You can anchor to significant events like earnings announcements, swing highs/lows, or key candles to see the average price since that event.
How do institutions use VWAP?
Institutions use VWAP as a benchmark for order execution. Their goal is often to execute at or below VWAP (for buys) or above VWAP (for sells). This creates natural support when price is below VWAP (institutions buying) and resistance when above.
What are VWAP standard deviation bands?
VWAP bands show price deviation from VWAP in standard deviation increments. The 1st band captures roughly 68% of price action, the 2nd band about 95%. Prices at 2+ deviations are statistically extended and often mean-revert to VWAP.
Does VWAP reset daily?
Standard VWAP resets at the beginning of each trading session. For 24-hour markets like futures, you can configure VWAP to reset at RTH open, midnight, or other times. Weekly and monthly VWAP variants maintain longer calculation periods.
How do I trade with VWAP?
Trade with VWAP by buying pullbacks to VWAP in uptrends (price above VWAP) and selling rallies to VWAP in downtrends (price below VWAP). Use bands for mean reversion at extremes. VWAP acts as support in uptrends and resistance in downtrends.