Skip to content
Menu

Standard Deviation Indicator

By Chad Smith, Director of Research & Analysis · Updated

On this page
  1. What it measures
  2. The formula
  3. Default settings
  4. How to read it
  5. Standard deviation vs ATR
  6. Common strategies
  7. Weaknesses
  8. Indicators it pairs with
SMA 20Std dev 20
Illustration, not real price data

The standard deviation indicator measures how widely prices are scattered around their average over a recent period. It is a statistical measure of volatility, shown as a single line in a separate panel. When the line rises, prices are spreading out; when it falls, they are clustering more tightly. It is the engine inside Bollinger Bands, but many traders also watch it on its own.

What it measures

Standard deviation measures dispersion: the typical distance of each price from the mean. If closes over the last 20 bars were all very close to their average, the standard deviation is small. If they ranged far above and below it, the standard deviation is large.

It is expressed in price units. A standard deviation of 1.5 on a stock means closes have typically sat about 1.5 away from their average. That makes it useful for comparing a market with its own past, but not directly comparable across markets with different price levels.

Standard deviation gives no direction. A sharp rally and a sharp sell-off both raise it, because both spread prices out.

The formula

Mean = SMA(Close, N)

Variance = sum of (Close(i) − Mean)² for the last N bars, divided by N

Standard Deviation = √Variance

where
  N = the lookback period (20 by default)

Trading platforms usually divide by N (population standard deviation).
Some statistics software divides by N − 1 (sample standard deviation).

Worked example (illustrative numbers). Take five closes: 10, 12, 11, 13 and 14. The mean is 60 / 5 = 12. The squared differences from the mean are (10 − 12)² = 4, (12 − 12)² = 0, (11 − 12)² = 1, (13 − 12)² = 1 and (14 − 12)² = 4. The sum is 10. The variance is 10 / 5 = 2. The standard deviation is √2 ≈ 1.41. Now compare five closes of 11.8, 12.1, 11.9, 12.0 and 12.2. The mean is still 12, but the standard deviation is about 0.14, ten times smaller, because the prices are tightly bunched.

Default settings

SettingConventional value
Period20
SourceClose
Moving average typeSimple

Shorter periods react faster to volatility bursts; longer periods give a steadier baseline. The standard deviation indicator is built into MetaTrader, TradingView and most charting platforms.

How to read it

High values. A high reading relative to the indicator's own history means prices have been spread out. This often happens during strong trends, sharp reversals and news-driven moves.

Low values. A low reading means prices have been clustered. Markets often go quiet before a larger move, so very low standard deviation can be a sign that a breakout may come. It does not say which way.

Turning points. Standard deviation often peaks near the end of sharp moves, when the spread is widest, and bottoms during consolidations. A peak in standard deviation does not mark a price top or bottom by itself, but a sharp fall from a peak suggests the market is calming.

Relative comparisons. Because it is in price units, traders sometimes divide standard deviation by price to get a percentage, which makes comparisons across markets easier.

Standard deviation vs ATR

Both measure volatility, but in different ways.

  • Standard deviation uses closes only and measures how spread out they are around the average. It reacts strongly to a few large closes because the differences are squared.
  • ATR uses the full high-low range of each bar, plus gaps, and averages them. It reacts more smoothly and captures intrabar movement that closes miss.

A market can have a large ATR but a small standard deviation if bars are wide but close near the same level each time. The opposite can happen when bars are narrow but closes trend steadily in one direction, pushing them away from the average.

That is why Bollinger Bands, built on standard deviation, react differently from Keltner Channels, built on ATR.

Common strategies

Volatility contraction setups

Watch for standard deviation to fall to a low relative to recent months. Then look for a breakout from the range, confirmed by price closing beyond support or resistance. The low reading only signals readiness; price provides the direction.

Trend exhaustion warning

During a strong trend, standard deviation rises as price moves away from its average. When it peaks and turns down while price stalls, the trend may be pausing. Traders use this as a cue to tighten stops rather than to reverse.

Position sizing

Like ATR, standard deviation can scale position size. Higher readings call for smaller positions, so the risk per trade stays similar when volatility changes.

Z-score of price

Dividing the distance between price and its average by the standard deviation gives a z-score. A reading of +2 means price is two standard deviations above its average. This is the same idea as %B in Bollinger Bands, expressed differently.

Weaknesses

It gives no direction. On its own, standard deviation cannot tell you whether to buy or sell.

It lags. It is based on a past window, so it changes after volatility changes.

It is sensitive to outliers. Because differences are squared, one large close can lift the reading significantly and keep it high until that close leaves the window.

Market returns are not normally distributed. Textbook rules about how much data falls within one or two standard deviations do not hold neatly for prices, so treat statistical interpretations loosely.

Indicators it pairs with

  • Bollinger Bands, which use standard deviation to draw bands on the price chart.
  • ATR, for a range-based view of volatility.
  • ADX, to check whether high volatility comes with a real trend.
  • Moving averages, to provide the direction that standard deviation lacks.
  • Linear regression channels, which use standard deviation around a fitted line.

For more on volatility and risk, see the technical analysis course.

Brokers with strong charting to practice on

Put this into practice on a demo account first, with no money at risk.

Frequently asked questions

What does the standard deviation indicator measure?

It measures how spread out recent closing prices are around their moving average. A high value means prices have been scattered widely, and a low value means they have stayed close together.

Is standard deviation the same as volatility?

It is one common way to measure volatility. Other measures, such as Average True Range, look at bar ranges and gaps instead of the spread of closes.

What period is used for standard deviation?

A 20-period setting is common, partly because it matches the default of Bollinger Bands. Traders also use 10 for faster readings or 50 for slower ones.

Does a rising standard deviation mean price will fall?

No. Standard deviation rises when prices spread out in either direction. It says nothing about which way price is moving.

What is the link between standard deviation and Bollinger Bands?

Bollinger Bands are drawn a multiple of the standard deviation above and below a moving average. The standard deviation indicator shows that same distance as a separate line.