Volume Indicators

Volume Weighted Standard Deviation (VWSD)

In this page: what Volume Weighted Standard Deviation is, how it works, when to use it, a practical example with code, and a bonus tip.

📖 7 min read

📝 1,335 words

🏷️ Volume Indicators

What is the Volume Weighted Standard Deviation (VWSD)?

The Volume Weighted Standard Deviation (VWSD) measures how widely prices have spread around the volume-weighted average price (VWAP), counting each bar in proportion to its volume. It is the square root of the volume-weighted variance of price around VWAP. Traders mostly use it to draw bands at VWAP ± 1, 2 or 3 VWSD, the familiar "VWAP bands".

In plain terms: standard deviation asks "how far do prices usually sit from their average?"; VWSD asks the same question but lets a bar with heavy volume count more than a quiet one. When every bar has the same volume, the two give the same number.

How VWSD is calculated

Take the bars in the window, with price p (usually the typical price, (High + Low + Close) / 3) and volume v for each bar:

  • VWAP = Σ(v × p) / Σv
  • Weighted variance = Σ(v × (p − VWAP)²) / Σv, which is the same as Σ(v × p²) / Σv − VWAP²
  • VWSD = √(weighted variance)
  • Bands: upper = VWAP + k × VWSD, lower = VWAP − k × VWSD, where the multiplier k is usually 1, 2 or 3

The second form of the variance needs only three running sums (Σv, Σv × p and Σv × p²), so charting platforms can update it bar by bar. TradingView's VWAP bands use this form, dividing by Σv with no small-sample correction.

Which bars are in the window? There are two common versions, and they give different numbers:

  • Anchored (the usual one). The sums start at an anchor, such as the session open, the start of the week or the start of the month, and reset there. This is what VWAP bands on most charts show: VWSD of everything traded since the anchor.
  • Rolling. The sums cover the last N bars, like a standard deviation over 20 bars. There is no reset, so the value moves smoothly from one day to the next.

How traders read VWSD

  • Band width. A wide band means trading since the anchor has been spread over a wide price range; a narrow band means most volume has traded close to VWAP. A band that keeps widening during a session usually goes with a directional move.
  • Distance from VWAP. (Price − VWAP) / VWSD tells you how many VWSD units price sits from VWAP. A reading of +2 means price is at the upper 2-VWSD band, far from where most of the volume changed hands.
  • Ranges versus trends. In a range-bound session, mean-reversion traders watch the ±2 bands for a move back towards VWAP. On a strong trend day price can ride the +1 or +2 band for hours, so a band touch on its own is not a reason to fade the move.
  • Risk sizing. VWSD is in price units, so it can set a stop distance (for example 1.5 × VWSD) or scale position size down when it is large.

Settings and their effect

  • Anchor or length. A daily anchor suits intraday charts; a weekly or monthly anchor suits H1 and H4. A longer window gives a steadier, slower VWSD.
  • Multiplier k. Larger k puts the bands further out, so price reaches them less often.
  • Price source. Typical price is the common default; close-only gives slightly different values.
  • Volume source. Exchange-traded markets give traded volume. On forex and CFDs most brokers only provide tick volume (the number of price changes), which follows activity but is not traded volume.

Common mistakes and limits

  • Reading the bands as probabilities. The rule that about 95 % of values lie within 2 standard deviations holds for a normal distribution. Prices have fat tails and trends, so the 2-VWSD band is a reference distance, not a 95 % boundary.
  • Using the first bars after a reset. Right after the anchor there are only a few bars, VWSD is close to zero and the bands hug VWAP. Early-session touches mean little.
  • An anchor with too few bars. A daily anchor on a daily chart puts one bar in each period, so VWSD is zero and the bands sit on VWAP.
  • Comparing numbers across platforms. Anchored and rolling versions, typical price and close, traded and tick volume all change the value. Check which version a platform uses before you copy a level.
  • No direction. VWSD only measures spread. It says nothing about whether price will rise or fall, so it needs a separate entry condition.

VWSD compared with standard deviation and Bollinger Bands

  • Standard deviation gives every bar the same weight and measures spread around a simple average. VWSD weights each bar by its volume and measures spread around VWAP. With equal volumes they are identical.
  • Bollinger Bands are a 20-bar simple moving average ± 2 standard deviations of the close, recalculated on a rolling window with no reset and no volume. Anchored VWAP bands are VWAP ± k × VWSD and restart at each anchor. Use Bollinger Bands when volume data is poor; use VWAP bands when you care about where volume actually traded within a session.
  • VWAP is the centre line that VWSD is measured from; the two are almost always used together.

Worked example: VWSD and VWAP bands step by step

Five bars since the anchor, with typical price and volume:

text
Bar   Price   Volume    v × p     p − VWAP   v × (p − VWAP)²
1     100.0     200    20,000       −1.8          648
2     101.0     100    10,100       −0.8           64
3     102.0     100    10,200       +0.2            4
4     101.0     300    30,300       −0.8          192
5     104.0     300    31,200       +2.2        1,452
Sum             1,000  101,800                  2,360
  • VWAP = 101,800 / 1,000 = 101.80
  • Weighted variance = 2,360 / 1,000 = 2.36
  • VWSD = √2.36 ≈ 1.54
  • 2-VWSD bands: 101.80 ± 3.07, so the lower band is about 98.73 and the upper band about 104.87

For comparison, the plain standard deviation of the same five prices (equal weights, around their simple average of 101.60) is about 1.36. VWSD is larger here because the two bars furthest from the average, at 100 and 104, carry half of the volume. If bar 5 had traded only 50 instead of 300, its weight would shrink and so would VWSD.

Using VWSD bands in a strategy

A common intraday use is a return to VWAP inside a range-bound session, with a daily anchor on a 5- or 15-minute chart:

  • Entry (long): after a close below the lower 2-VWSD band, buy when the close crosses back above it.
  • Target: VWAP, where most of the session's volume traded.
  • Stop: a close below the lower 3-VWSD band, or a fixed distance of about 1.5 × VWSD.
  • Filter: skip the first part of the session, while the bands are still narrow, and skip days where VWAP slopes steadily, which suggests a trend rather than a range.

The short side mirrors these rules at the upper bands. This is a starting point to test on your own data, not a rule set with known results.

In the AlfaTactix Strategy Builder there is no separate VWSD indicator: it is the band of the VWAP indicator. Choose VWAP, set the Reset period (day, week or month) and a Band width (× σ) between 0.1 and 5; the σ is the volume-weighted standard deviation since the reset, the anchored form described above. The upper band and lower band lines can then be used in entry and exit rules, for example "Close crosses above VWAP lower band". To stop at the 3-VWSD band as well, add a second VWAP with band width 3. On forex the volume is tick volume. You can build this as an Expert Advisor with the no-code MT5 EA builder or as a Pine Script strategy for TradingView.

Further reading: TradingView's VWAP help page (opens in a new tab), which describes the VWAP band settings.