VWAP Deviation Indicator
- Indicators
- Version: 1.1
- Activations: 5
VWAP Deviation Indicator
The VWAP Deviation Indicator is a volume-weighted price analysis tool designed to identify the current price's relationship to a dynamically calculated VWAP basis and its deviation levels.
Unlike a simple moving average, this indicator incorporates tick volume weighting, allowing the VWAP calculation to give greater importance to price levels associated with higher trading activity.
The indicator displays a central VWAP Basis together with 2x and 3x deviation bands, creating a dynamic framework for analyzing price position, potential overextension, and mean-reversion areas.
Key Features
Volume-Weighted VWAP
The indicator calculates a custom VWAP using tick volume over the selected calculation period.
Dynamic Deviation Bands
Four deviation levels are displayed around the VWAP:
-
Upper Dev 2 — VWAP + 2× deviation
-
Upper Dev 3 — VWAP + 3× deviation
-
Lower Dev 2 — VWAP − 2× deviation
-
Lower Dev 3 — VWAP − 3× deviation
These levels dynamically adapt to current market conditions.
Two Deviation Methods
You can choose between:
Average Deviation
-
Uses the volume-weighted average absolute deviation from VWAP.
-
Provides a robust measure of typical price dispersion.
Standard Deviation
-
Uses volume-weighted standard deviation.
-
Particularly useful for identifying statistically wider price deviations from VWAP.
Log-Space Calculation
The optional Log-Space mode performs the VWAP and deviation calculations in logarithmic price space and converts the results back to normal price values.
This can be useful when analyzing markets across different price scales or when proportional price movements are more relevant than absolute price movements.
Configurable VWAP Source
The calculation source can be selected from the standard MQL5 applied price types, including:
-
Close
-
Open
-
High
-
Low
-
Median
-
Typical
-
Weighted
Configurable Calculation Length
The VWAP calculation period is fully adjustable.
The default setting is 60 bars, but you can choose a period that matches your trading style and timeframe.
How to Use
The VWAP Basis can be used as a dynamic reference level for determining whether price is trading above or below its volume-weighted mean.
The deviation bands can help identify areas where price has moved significantly away from the VWAP.
For example:
Price above VWAP
→ Market is trading above its volume-weighted reference price.
Price below VWAP
→ Market is trading below its volume-weighted reference price.
Price near ±2 deviation
→ Price has moved significantly away from VWAP.
Price near ±3 deviation
→ Price is experiencing an even larger deviation from the VWAP reference.
These levels can be used as additional information when analyzing trends, pullbacks, breakouts, and potential mean-reversion setups.
Suitable For
The indicator can be used on:
-
Forex
-
Gold and precious metals
-
Indices
-
Stocks
-
Futures
-
CFDs
-
Cryptocurrencies
It can be applied to different timeframes and can also be used as a component of automated trading strategies and Expert Advisors.
Important Note
The VWAP Deviation Indicator is an analytical tool and does not generate guaranteed trading signals. Deviation levels should be interpreted together with price action, market structure, trend conditions, and other relevant market information.
Parameters
Log-space
Enable or disable logarithmic VWAP and deviation calculations.
Deviation Type
Choose between Average Deviation and Standard Deviation.
Length
Number of bars used for the VWAP and deviation calculation.
VWAP Source Price
Select the price source used for the calculation.
Simple, Clear and Powerful VWAP Analysis
Use VWAP as your dynamic market reference and deviation bands to understand how far price has moved from its volume-weighted mean.
VWAP Basis • 2× Deviation • 3× Deviation • Average/Standard Deviation • Log-Space • Fully Configurable
