VWAP Intraday Indicator: One Session, One Running Average

Written by Dominic Walsh · Published · Last updated

The vwap intraday indicator resets once a day and builds up from there. Each bar adds its typical price times volume. Divide the running total by the running volume and you have the volume weighted average price for the session so far.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 2: Intraday VWAP, Prev Session VWAP
Alerts popup, push notification, email, sound
Inputs 9

What the VWAP Intraday Indicator draws on the chart

Intraday VWAP is the deep sky blue line, running from the session reset.

Prev Session VWAP is the dim gray level holding where the last session finished.

The blue line restarts at each reset, so it steps rather than continues.

`ShowPrevSessionLevel` turns the gray level off when you want the current session alone.

  • Intraday VWAP: line, deep sky blue, width 2
  • Prev Session VWAP: line, dim gray, width 1
VWAP intraday indicator on EURUSD H1 with the session line and prior level
VWAP intraday indicator on EURUSD H1 with the session line and prior level

How the VWAP Intraday Indicator calculates its values

Defining a session

SessionId maps each bar time to a session number. `SessionStartHour` `0` sets the reset point. When that number changes, the old total ends and a new one starts.

Accumulating the average

tp takes high plus low plus close over three. cumPV adds tp times volume. cumV adds the volume alone. vwap then divides one by the other. Every bar since the reset counts.

Choosing the volume source

`UseRealVolume` picks between the broker real volume field and tick volume. It ships false. Most forex feeds put nothing useful in that field.

How to read the signals

The line is an average price weighted by activity, not a moving average.

Early in a session it sits close to price, since few bars have added to it.

The gray level from the last session often acts as a reference.

A reset at `SessionStartHour` `0` uses server midnight, which rarely matches a real day.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` is true out of the box. `EnablePopup` delivers the text. `EnablePushNotify`, `EnableEmail` and `EnableSound` all begin false. `SoundFile` picks the clip. The cross test reads two closes.

Every VWAP Intraday Indicator input

Core settings

Setting What it does Default
SessionStartHour Session reset hour (server time, 0-23). Hour the accumulation resets, in server time, default `0`. 0
UseRealVolume Use real volume instead of tick volume. Uses broker real volume instead of tick volume, default `false`. off

Display settings

Setting What it does Default
ShowPrevSessionLevel Draw prior session’s closing VWAP as a level. Draws the previous session closing level, default `true`. on

Alert settings

Setting What it does Default
EnableAlerts Master switch for the VWAP cross alerts, default `true`. on
EnablePopup Terminal dialog on a VWAP cross, default `true`. on
EnablePushNotify Phone push on a VWAP cross, default `false`. off
EnableEmail Mail delivery on a VWAP cross, default `false`. off
EnableSound Sound playback on a VWAP cross, default `false`. off
SoundFile Wav clip for the VWAP alert, default `alert.wav`. alert.wav
VWAP intraday indicator inputs: SessionStartHour, ShowPrevSessionLevel, UseRealVolume
VWAP intraday indicator inputs: SessionStartHour, ShowPrevSessionLevel, UseRealVolume

Settings that fit your chart

An intraday average needs enough bars per session to mean much. EURUSD H1 is the reference chart, where a day gives twenty-four bars. On M5 that becomes nearly three hundred, which is where this measure belongs. On H4 six bars per session is too few.

When the VWAP Intraday Indicator fails

Forex has no central exchange, so tick volume is a proxy and differs by broker.

A server midnight reset splits the day at an odd point.

Late in a session the line barely moves, since so many bars already sit in the total.

Copy the compiled VWAP Intraday Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the VWAP Intraday Indicator for MT4 and MT5

The zip holds the compiled VWAP Intraday Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why does UseRealVolume start switched off?

Because most forex brokers report nothing useful in the real volume field. Tick volume counts price updates, which at least tracks activity. Switch it on only if you know your feed carries genuine traded volume.

Where does SessionStartHour at 0 split the day?

At server midnight. That is an odd split for forex, since no session opens there. Setting it to your own session open usually gives a more useful line.

Why does the line barely move late in a session?

Because the running totals already hold hundreds of bars. One more adds very little. That comes with any cumulative measure, and it is why the early session reading is the volatile part.

What is the Prev Session VWAP level for?

It holds where the last session finished, drawn flat across the current one. Many traders watch it as a reference. Turn it off with `ShowPrevSessionLevel` if you would rather read the live line alone.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the VWAP Intraday Indicator as one input. Always backtest before trading live.

Category: this is part of our Volume collection. Browse more Volume for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment