Skip to content
Trading leveraged FX and CFDs is high risk and can result in rapid losses. Read the risk notice
VOLATILITY, NOT DIRECTION

Standard deviation, read on a chart.

QUICK ANSWER

Standard deviation tells you how spread out the selected prices are around their rolling average. A low reading means the values are clustered; a high reading means they are dispersed. It does not tell you whether the next move is up or down.

All prices and outcomes on this page are fictional teaching examples, not performance claims.

THE INDICATOR ANSWERSHow spread out?Not: which direction?
price moves both waysdispersion expands
01 / THE MEASURE

One number. One question.

Standard deviation is a rolling description of dispersion. It compares every selected observation with the window's average, makes negative and positive distances comparable by squaring them, averages those squares, then takes the square root to return to price units.

C11.1000C21.1002C31.0998C41.1004C51.0996
  1. 1
    Find the mean

    The five closes average 1.1000.

  2. 2
    Measure each distance

    0, +2, -2, +4 and -4 pips from the mean.

  3. 3
    Square and average

    (0 + 4 + 4 + 16 + 16) / 5 = 8.

  4. 4
    Take the square root

    Population standard deviation = 2.8 pips.

PLAIN-LANGUAGE FORMULAsqrt( average( (price - mean)^2 ) )
It can describe

Quiet versus active windows, expansion versus compression, and relative distance when used inside a defined method.

It cannot decide

Direction, support, resistance, a reversal point, a stop location or whether returns follow a normal distribution.

The window rolls

A shock can keep the line high until that observation leaves the lookback, even if the latest candles become calm.

02 / READ THE SHAPE

Four states, zero directional votes.

Read level and slope separately. The exact number is meaningful only for the same symbol, input, timeframe and settings; use a fixed rolling reference rather than calling a line "high" by eye.

01

Low + flat

clustered pricequiet, not a forecast

Recent values are close to their mean. A breakout may or may not follow; low dispersion alone supplies no trigger.

02

Expanding

movement spreadsSD slope rising

Dispersion is increasing. Use price structure or a trend rule to determine whether that expansion supports a long, a short or no trade.

03

High + holding

wide two-sided barshigh can persist

Values remain widely dispersed. This can be a fast trend or unstable whipsaw; "high" is not synonymous with overbought or due to reverse.

04

Compressing

ranges narrowSD slope falling

Dispersion is declining. Compression can continue for many candles, so wait for a separately defined expansion trigger.

INTERACTIVE VOLATILITY LAB

See what makes standard deviation move.

Switch the price behaviour, then change the rolling window. The shaded area is the latest mean plus or minus one population standard deviation.

Price behaviour
Rolling mean
1.10260
Standard deviation
1.2 pips
Window range
4.0 pips
READ THE RESULT

The closes are bunched together, so dispersion is low. That describes the recent movement; it does not promise that a breakout is next.

HOW TRADERS ADD CONTEXT

Use dispersion to describe the volatility regime. Add structure or a directional rule for the trade idea, and size the stop from price rather than treating one or two standard deviations as guaranteed turning points.

03 / TWO DEMO METHODS

Turn a reading into testable rules.

These are exact starting hypotheses for demo research, not claims of an edge. Both use a $10,000 USD demo account, a $25 all-in loss cap per trade, completed H1 candles and the stated cost allowance. Keep every rule unchanged for the sample and retain failed and skipped setups.

METHOD 01

Use standard deviation as an activity filter; let EMA slope and price location supply direction.

Trend pullback + SD expansion

Chart
EUR/USD H1 candles; EMA(50) of close; Standard Deviation(20), SMA method, close, shift 0. In this method, one pip is 0.0001. Evaluate only after an H1 candle closes.
Context
Long only when close is above EMA(50) and EMA(50) is above its value five completed bars ago. Short is the exact inverse.
Pullback
The first later candle whose low touches or crosses EMA(50) starts a long pullback; for a short, use the first candle whose high touches or crosses it. The signal must occur on that candle or one of the next two. The swing low is the lowest low from the first pullback candle through the long signal; the swing high is the inverse for a short.
SD filter
Signal-bar SD(20) is above the median of the previous 20 completed readings, excluding the signal. Sort those values and average the 10th and 11th. The signal value must also be greater than the prior bar's value, which must be greater than the value two bars ago.
Long / short trigger
Long: a completed candle closes back above EMA(50); place a buy stop exactly one pip above its high. Short: close back below; sell stop exactly one pip below its low. Cancel after three completed bars.
Stop / invalidation
Long stop exactly one pip below the defined pullback swing low; short stop exactly one pip above its swing high. Cancel before entry if a candle closes through that stop price.
Risk / size
Account $10,000; maximum all-in loss $25. Reserve $1 for a fictional round-turn commission and $1 for adverse slippage. Divide the remaining $23 by stop distance in pips and the symbol's pip value per lot, then round volume down to the permitted step. The example specification is $10 per pip at 1.00 lot with a 0.01-lot step. Entry and exit prices already include spread.
Exit
Set the target two initial stop distances from entry. Exit there or on the first completed close across EMA(50) against the trade, whichever occurs first. Keep the initial stop. Report net R using the actual all-in stop loss after volume rounding as 1R.
No trade
Skip if the signal candle's range exceeds 1.5 x ATR(14), spread is above 1.2 pips, or a chosen high-impact event window is active. Before the session, mark every confirmed H1 pivot in the previous 100 bars. A pivot high has a higher high than the two completed bars on each side; a pivot low is the inverse. At the signal, use the nearest marked pivot above a long entry or below a short entry; skip if it is closer than the two-stop-distance target.
FICTIONAL WORKED LONGEUR/USD · H1
EMA 50 risingpullbacktrigger2R exit
Entry1.0869signal high 1.0868 + 1 pip
Stop1.0849swing low 1.0850 - 1 pip
Size0.11 lot$23 / (20 pips x $10), rounded down
Target1.090940 pips = 2 x stop distance
Net result+$42.00$44 gain - $2 costs = +1.75R
SD check8.1 pipsabove 6.0 median; rising twice

The EMA decides the allowed side. The SD condition says activity is expanding; it does not create the long direction. A stopped trade is $22 price loss plus the $2 allowance = $24, or -1R, inside the $25 cap. The assumed 1.0-pip spread is already in the executable fictional prices; overnight financing is excluded.

METHOD 02

Define a price box first, then require dispersion to leave a measured low-volatility state.

Compression-to-expansion breakout

Chart
GBP/USD H1 candles; Standard Deviation(20), SMA method, close, shift 0. In this method, one pip is 0.0001. Set the box before the five-bar compression check: its high and low are the highest high and lowest low of bars 6 through 25 before the signal candidate.
Compression context
For each of the five bars before the signal candidate, SD(20) was below the 25th percentile of the 100 SD readings immediately before that bar. Sort those values low to high and use the 25th value; the tested bar is excluded. Each of those five closes must also stay inside the same fixed box.
Expansion filter
On the signal close, SD(20) crosses above the median of its previous 20 completed readings, excluding the signal value, and is higher than on each of the prior two bars. For 20 values, the median is the average of the 10th and 11th values after sorting low to high.
Long / short trigger
Long signal closes above the box high; buy stop exactly one pip above its high. Short signal closes below the box low; sell stop exactly one pip below its low. Cancel after two completed bars.
Stop / invalidation
Stop exactly one pip beyond the opposite end of the signal candle. Cancel before entry if a completed close returns inside the old box.
Risk / size
Account $10,000; maximum all-in loss $25. Reserve $1 for a fictional round-turn commission and $1 for adverse slippage. Divide the remaining $23 by stop distance in pips and pip value per lot, then round volume down to the permitted step. The example specification is $10 per pip at 1.00 lot with a 0.01-lot step. Entry and exit prices already include spread.
Exit
Set the target two initial stop distances from entry. Exit there or on the first completed close back inside the old box, whichever occurs first. Keep the original stop and report net R using the actual all-in stop loss after volume rounding as 1R.
No trade
Skip if the signal range exceeds twice the median range of the prior 20 bars, the box width exceeds 1.5 x ATR(14), spread is above 1.5 pips, or the data window has missing bars. Before the session, mark every confirmed H1 pivot in the prior 100 bars using Method 01's two-bars-on-each-side rule. At the signal, use the nearest pivot above a long entry or below a short entry; skip if it is closer than the two-stop-distance target.
FICTIONAL WORKED SHORTGBP/USD · H1
20-bar boxshort closeSD expansion2R exit
Box low1.2740previous 20 bars
Entry1.2730signal low 1.2731 - 1 pip
Stop1.2750signal high 1.2749 + 1 pip
Size0.11 lot$23 / (20 pips x $10), rounded down
Target1.269040 pips = 2 x stop distance
Net result+$42.00$44 gain - $2 costs = +1.75R

The box break supplies short direction. SD rising from 3.1 to 5.7 pips meets the expansion filter; it does not guarantee follow-through. A stopped trade is $22 price loss plus the $2 allowance = $24, or -1R, inside the $25 cap. The assumed 1.2-pip spread is already in the executable fictional prices; overnight financing is excluded.

FAILURE FILES

Expansion can be the wrong kind of movement.

Keep these cases in the sample. A filter is useful only if its exclusions and losses are recorded as carefully as its clean examples.

Shock masquerading as resumption
oversized signalSD jumpsrule says skip

SD expands, but the signal candle is larger than 1.5 x ATR and the next bar erases it. Method 01's no-trade rule rejects the setup before entry.

Price poke without expansion
brief box pokeSD stays lowback inside

A wick clears the box, but there is no qualifying close and no SD cross above its reference. Method 02 records no trade, not a missed winner or an invented late entry.

04 / PLATFORM SETUP

Match the inputs, then compare.

Standard Deviation is built into MT4, MT5 and TradingView. Keep the symbol feed, timeframe and completed-candle timing in your notes; identical labels do not guarantee identical values.

MT4

Insert → Indicators → Trend → Standard Deviation

  1. Open the intended symbol and timeframe.
  2. Set Period, Shift, MA method and Apply to.
  3. Use the Data Window to inspect completed-bar values.
Official MT4 calculation and help ↗
MT5

Insert → Indicators → Trend → Standard Deviation

  1. Choose the symbol and chart timeframe first.
  2. Set period, shift, averaging method and applied price.
  3. Confirm the separate-window line after the bar closes.
Official MT5 indicator help ↗
TRADINGVIEW

Indicators → Technicals → Standard Deviation

  1. Choose the exact symbol feed and interval.
  2. Open Settings → Inputs; record Length and Source.
  3. Keep the built-in study distinct from community scripts.
Official TradingView indicator steps ↗
COMMON INPUTS TO FREEZE

No universal best value

Treat 14, 20 and 50 as a small comparison grid, not as three recommendations. Shorter windows react faster and turn over observations sooner; longer windows respond more slowly and blend more regimes.

Period / length
14 faster · 20 middle comparison · 50 slower
Applied price / source
Close is a clear baseline; Open, High, Low, HL2, HLC3 and HLCC4 answer different questions.
MA method
SMA is the plain baseline used in this page's demos. EMA or other methods change the centre and output.
Shift
Keep shift 0 for ordinary research unless displacement itself is part of the written hypothesis.
Convention
Population divides by N; sample estimates often divide by N - 1. Verify the implementation before comparing tools.
05 / PAIR BY JOB

Add missing information, not another vote.

A useful stack has one explicit job per tool. Correlated transforms of the same closes are not separate confirmation just because they have different names.

DIRECTION

Moving average slope

Answers which side is allowed. SD still answers only whether dispersion is expanding or contracting.

Watch the overlap: SD may already be calculated around a moving average of the same closes.
LOCATION

Price structure

Pre-marked swings or a fixed range supply boundaries, invalidation and room-to-target.

This adds chart location instead of another transformation of volatility.
RISK DISTANCE

ATR — with one job

ATR can flag an oversized candle or scale a buffer, but it is another volatility measure.

Do not award one vote to rising SD and a second vote to rising ATR unless the rules give them distinct jobs.
DERIVED TOOL

Bollinger Bands / z-score

Both directly reuse standard deviation: bands scale envelopes; z-score divides distance by dispersion.

Band widening plus SD expansion is one mathematical family, not two confirmations.
Open the indicator pairing matrix
06 / PUT IT TO WORK

From chart idea to review.

Recreate one method, freeze the card, replay unseen candles, size the fictional risk and record every qualified setup.

07 / QUICK CLARIFICATIONS

Standard deviation FAQ

The shortest answers to the questions most likely to distort a chart test.

01Does rising standard deviation mean price will rise?

No. Standard deviation measures how widely the selected values are spread around their average. A sharp rise can accompany an up move, a down move or two-sided whipsaw.

02What is the best standard deviation setting for forex?

There is no universal best period, average method or price input. A useful research process compares a small fixed set, such as 14, 20 and 50 completed closes, then evaluates the same rule across unseen charts and realistic costs.

03Is standard deviation the same as ATR?

No. Standard deviation measures dispersion around an average of the selected input. ATR averages true range and explicitly includes gaps through its true-range calculation. Both describe volatility, so assigning each a separate confirmation vote can double-count the same market property.

04Does very high standard deviation predict a reversal?

No. High standard deviation says recent observations are widely dispersed. It does not identify a ceiling, floor or direction, and the reading can stay high while a trend continues.

05Why do MT4, MT5 and TradingView values differ?

Check the symbol feed, candle boundaries, period, applied price or source, moving-average method, shift and calculation convention. A small difference is not automatically an error; document the exact platform and inputs used for a test.

06How is standard deviation related to Bollinger Bands?

Bollinger Bands place envelopes a chosen number of standard deviations around a moving average. Band widening and a rising standard-deviation line are therefore mathematically related, not two independent confirmations.

PRIMARY REFERENCES

Check the platform's own documentation.