What it does
Session VWAP gives traders a straightforward fair-value reference that resets with the session and stays tied to the day’s actual participation. It is useful when you want a steadier volume-weighted benchmark for reclaims, rejection tests, and pullback context.
Who this is for
This page is a good fit for traders who want a readable Session VWAP workflow without having to reverse-engineer the setup from forum posts or screenshots.
Key terms for this tool
Review the core trading and platform terms tied to this page before changing settings or using the study in a live workspace.
What it is not
Session VWAP is a chart-context tool. It does not place trades, manage risk automatically, or promise that a specific pattern will resolve in one direction. Use it to organize decisions, not to outsource them.
Chart examples
This chart capture shows the study on a real NinjaTrader workspace. Use it as visual reference, then confirm behavior on your own instrument, session, and timeframe.
Session VWAP on a live chart
A NinjaTrader 8 chart capture showing Session VWAP anchored to the trading day for intraday fair-value context.
Best fit
- Tracking intraday fair value with a simple session reset.
- Comparing pullbacks and reclaims against a stable volume-weighted baseline.
- Pairing VWAP context with session highs, lows, and opening range levels.
Before using it live
- Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow.
- Apply it to an intraday chart with a session template that matches the market you trade.
- Compare it against your session open and major levels before using it as a decision anchor.
- Review how the tool behaves on your actual session template, chart type, and instrument.
Settings to review
Toggles the upper and lower standard deviation bands around the session VWAP.
Controls how far the optional bands sit from the main session VWAP line.
Sets the color of the primary session VWAP line.
Installation notes
- Import the NinjaTrader 8 ZIP through NinjaTrader's normal import flow.
- Apply it to an intraday chart with a session template that matches the market you trade.
- Compare it against your session open and major levels before using it as a decision anchor.
Downloads
Source code
These source examples are provided for copy/paste workflows on other charting platforms. Review and test any script in a simulator before using it on a live chart.
{
Session VWAP
FreeIndicators.com source example.
Works as a starting point for TradeStation EasyLanguage and MultiCharts PowerLanguage.
}
Vars: SessionPV(0), SessionVolume(0), SessionVWAPValue(0);
If Date <> Date[1] Then Begin
SessionPV = TypicalPrice * Volume;
SessionVolume = Volume;
End Else Begin
SessionPV = SessionPV + TypicalPrice * Volume;
SessionVolume = SessionVolume + Volume;
End;
If SessionVolume > 0 Then SessionVWAPValue = SessionPV / SessionVolume;
Plot1(SessionVWAPValue, "SessionVWAP"); // Session VWAP
// FreeIndicators.com source example for MetaTrader 4.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 DodgerBlue
#property indicator_color2 Crimson
#property indicator_color3 SeaGreen
double Buffer1[];
double Buffer2[];
double Buffer3[];
int init() {
SetIndexBuffer(0, Buffer1);
SetIndexBuffer(1, Buffer2);
SetIndexBuffer(2, Buffer3);
return(0);
}
int start() {
int counted = IndicatorCounted();
int limit = Bars - counted - 1;
double sessionPV = 0, sessionVolume = 0;
datetime currentDay = 0;
for(int i = limit; i >= 0; i--) {
datetime day = iTime(NULL, PERIOD_D1, iBarShift(NULL, PERIOD_D1, Time[i], true));
if(day != currentDay) {
currentDay = day;
sessionPV = 0;
sessionVolume = 0;
}
double price = (High[i] + Low[i] + Close[i]) / 3.0;
sessionPV += price * Volume[i];
sessionVolume += Volume[i];
Buffer1[i] = sessionVolume > 0 ? sessionPV / sessionVolume : price;
}
return(0);
} // Session VWAP
// FreeIndicators.com source example for MetaTrader 5.
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_plots 3
double Buffer1[];
double Buffer2[];
double Buffer3[];
int OnInit() {
SetIndexBuffer(0, Buffer1, INDICATOR_DATA);
SetIndexBuffer(1, Buffer2, INDICATOR_DATA);
SetIndexBuffer(2, Buffer3, INDICATOR_DATA);
return(INIT_SUCCEEDED);
}
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[]) {
int start = prev_calculated > 1 ? prev_calculated - 1 : 1;
double sessionPV = 0, sessionVolume = 0;
int currentDay = -1;
for(int i = start; i < rates_total; i++) {
MqlDateTime dt; TimeToStruct(time[i], dt);
if(dt.day != currentDay) {
currentDay = dt.day;
sessionPV = 0;
sessionVolume = 0;
}
double price = (high[i] + low[i] + close[i]) / 3.0;
sessionPV += price * tick_volume[i];
sessionVolume += tick_volume[i];
Buffer1[i] = sessionVolume > 0 ? sessionPV / sessionVolume : price;
}
return(rates_total);
} //@version=5
indicator("Session VWAP", overlay=true)
typical = hlc3
newSession = ta.change(time("D"))
var float sessionPV = na
var float sessionVolume = na
sessionPV := newSession ? typical * volume : nz(sessionPV[1]) + typical * volume
sessionVolume := newSession ? volume : nz(sessionVolume[1]) + volume
sessionVWAP = sessionVolume > 0 ? sessionPV / sessionVolume : typical
plot(sessionVWAP, "Session VWAP", color=color.blue) Limitations
- Session templates directly affect the line.
- VWAP is context, not a stand-alone entry trigger.
- Volume quality matters more in some markets than others.
Frequently asked questions
Does it repaint?
This indicator is designed as a chart reference tool, not as a hindsight-only backfitted signal. Even so, you should still test it bar by bar on your chart type to confirm how it behaves on the active bar.
Which platforms are covered?
NinjaTrader 8, TradeStation EasyLanguage, MultiCharts PowerLanguage, MetaTrader 4, MetaTrader 5, TradingView Pine Script are currently represented through downloads or source pages.
Is source code included?
Yes. This page includes source examples or links to platform-specific source pages where applicable.