The VWAP indicator for MT4 plots the volume-weighted average price for the current day, week or month, resetting at the start of each new period. It also draws optional bands one and two standard deviations away, so you can see at a glance whether price is trading near its average or stretched far from it.
MetaTrader 4 has no built-in VWAP, which is why so many traders look for a custom one. This free version is short, readable code that calculates the session VWAP the standard way and works on any symbol and intraday timeframe.
What Is the VWAP Indicator?
VWAP stands for volume-weighted average price. It is the average price of a session where each bar’s price is weighted by how much volume traded on that bar. Bars with heavy activity pull the average toward their price more than quiet bars do. Because it resets at the start of each session, VWAP shows where the bulk of trading has happened so far in that day, week or month.
Intraday traders use VWAP as a fair-value reference. Price holding above a rising VWAP is often read as buyers in control for that session, and price holding below a falling VWAP as sellers in control. The standard-deviation bands help judge how far price has moved away from that average.
A note on volume in MT4
Spot forex has no central exchange, so MT4 cannot show true traded volume for currency pairs. What it provides is tick volume: the number of price changes during each bar. This indicator uses tick volume, because that is the only volume MT4 gives a custom indicator. Tick volume tends to rise and fall with real activity, but it is not the same thing as exchange volume, and VWAP values can differ slightly between brokers because each broker has its own price feed.
How it is calculated
For every bar, the indicator takes the price chosen in PriceType (typical price, (high + low + close) / 3, by default) and the bar’s tick volume. From the first bar of the period it keeps three running totals:
- the sum of price × volume,
- the sum of volume,
- the sum of price² × volume.
VWAP is the first total divided by the second. The volume-weighted standard deviation is the square root of (sum of price² × volume ÷ sum of volume) minus VWAP². The bands are VWAP plus and minus Dev1 and Dev2 times that standard deviation. When a new day, week or month starts (using your broker’s server time), all three totals reset to the first bar of the new period. Daily periods follow server midnight, weekly periods run Sunday to Saturday, and monthly periods follow the calendar month.
Key Features
- Daily, weekly or monthly anchored VWAP in one indicator.
- Choice of seven price types, with typical price as the default.
- Optional ±1 and ±2 standard-deviation bands, both multipliers adjustable.
- Five plotted lines that show in the Data Window, so you can read exact values on any bar.
- Incremental calculation: only the newest bar is recalculated on each tick, so it stays light even on M1 charts.
How to Trade With the VWAP Indicator
VWAP is a reference line, not an entry signal by itself. Two common approaches are trend pullbacks and mean reversion toward the average.
Trend pullback
- Note which side of the daily VWAP price is holding during the active session. Use a trading sessions indicator to see when London and New York open.
- If price is holding above a rising VWAP, wait for a pullback toward the VWAP line or the lower 1-SD band.
- Enter on a bullish confirmation candle as price rejects that area.
- Place the stop below the pullback low, or a short distance below the VWAP. For shorts, reverse the rules below a falling VWAP.
Mean reversion from the outer bands
- In a quiet, range-bound session, watch for price to reach the 2-SD band.
- Look for rejection: a long wick, an engulfing candle, or loss of momentum.
- Target a move back toward the 1-SD band or the VWAP itself.
- Avoid fading the bands on strong news days; in a real trend, price can walk along the outer band for hours.
VWAP also lines up well with other session levels. Confluence with daily pivot points or the previous day high and low gives you a better-defined area to trade from than any single line.
Best Settings
- Day trading (M1 to M15): AnchorPeriod Daily, PriceType Typical, ShowBands true, Dev1 1.0, Dev2 2.0. This is the classic intraday setup.
- Swing context (H1 to H4): AnchorPeriod Weekly gives an average for the whole trading week; Monthly suits position traders on H4.
- Tighter bands: some traders prefer Dev1 0.5 and Dev2 1.0 on low-volatility pairs. Test it on your own symbol.
Use VWAP on timeframes below the anchor period. A daily VWAP on a D1 chart resets every bar, so it simply follows that bar’s price. Keep in mind that the daily reset follows your broker’s server time, which may not match the session you trade.
Does It Repaint?
No. The VWAP indicator is non-repainting. Each bar’s value depends only on that bar and the bars before it in the same period. While a bar is still forming, its VWAP and band values move with every tick, as any indicator’s current bar does. Once the bar closes, its values are fixed and are never recalculated. If you want the background on why this matters, read our guide on what repainting is.
How to Install
Download the free file, then in MetaTrader 4 open File > Open Data Folder > MQL4 > Indicators and copy vwap-indicator-mt4.mq4 into that folder. Restart the terminal or right-click Indicators in the Navigator and choose Refresh, and the indicator compiles and appears under Indicators > Custom. Drag it onto a chart and adjust the inputs in the window that opens. The full walkthrough, with fixes for common problems, is in our guide on how to install indicators in MT4. This is an MT4 file, so it will not load in MetaTrader 5 (the two platforms use different file formats), and the MT4 mobile apps cannot run custom indicators at all, as explained in our MT4 mobile indicators guide.
Related Indicators
- VWAP Custom Position Indicator MT5 if you trade on MetaTrader 5 and want a VWAP anchored to a point you choose.
- Chaikin Money Flow (CMF) Indicator MT4 for another volume-based read on buying and selling pressure.
- Trading Sessions Indicator MT4 to mark the Asian, London and New York sessions.
- Pivot Points Indicator MT4 for daily support and resistance levels.
Browse all day trading indicators for more intraday tools.
Trading on margin carries a high level of risk, so test any new tool on a demo account before you use it with real money.

