Skip to content

Free MT5 indicator

VWAP Deviation Bands

Daily or weekly VWAP for MT5 with 1, 2 and 3 standard-deviation bands that reset each period, using tick volume when needed.

Volumev1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

The volume-weighted average price (VWAP) is the average price traded during a session, weighted by volume. This indicator calculates a daily or weekly VWAP that resets at the start of each period and draws bands at 1, 2 and 3 standard deviations around it. The bands show how stretched price is relative to the session's average.

Spot forex has no central exchange, so most brokers only provide tick volume (the number of price updates). The indicator uses real volume when the broker supplies it and falls back to tick volume when real volume is zero.

How it works

For every bar the typical price is (high + low + close) / 3 and the volume v is the real volume, or tick volume if real volume is zero.

  • From the first bar of the day (or week) the indicator keeps running sums of typical price x v, v, and typical price squared x v.
  • VWAP = sum(typical price x v) / sum(v).
  • Variance = sum(typical price squared x v) / sum(v) - VWAP squared; the standard deviation is its square root.
  • Bands = VWAP plus or minus 1, 2 and 3 standard deviations (configurable).
  • Days are calendar days in broker server time. Weeks start on Sunday so that a Sunday open belongs to the new week.

Each bar only adds to the previous bar's sums, so the calculation is incremental and fast.

How to use it

Intraday traders often treat VWAP as a fair-value line: price holding above it suggests buyers have been in control during the session, below it suggests sellers. The bands help frame extremes. Moves to the second or third band are statistically stretched and are a common area to look for mean-reversion setups, while repeated closes outside the first band can signal a trending day.

It suits liquid symbols on M1 to H1 charts, especially during the main forex trading sessions. Check the Forex Market Hours tool to know when your broker's day starts.

Settings

InputDefaultWhat it changes
Reset periodDailyDaily or weekly anchoring
Band 1 / 2 / 31.0 / 2.0 / 3.0Distance of each band pair in standard deviations
Show band 1 / 2 / 3trueHide any band pair you do not need
Alert band2Band whose closed-bar crossing triggers an alert
Popup alert / Push notificationfalseAlerts once per bar

Limitations

  • Tick volume is only a proxy for traded volume and differs between brokers.
  • Early in the period the VWAP and bands are based on few bars and move a lot; the bands start at zero width.
  • The reset follows broker server time, which may not match the session you care about.
  • The live bar's values change until the bar closes, as with any running average.

Key inputs

Key inputs of VWAP Deviation Bands
InputDefaultDescription
Reset periodDailyRestart the VWAP at the start of each day or each week (server time).
Band 1 (standard deviations)1.0Multiplier for the inner bands.
Band 2 (standard deviations)2.0Multiplier for the middle bands.
Band 3 (standard deviations)3.0Multiplier for the outer bands.
Alert when a bar closes beyond band (1, 2 or 3)2Which band the alert watches.
Popup alertfalseShows an MT5 alert once per bar when a close moves beyond the chosen band.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators