ATR¶
Indicators · Volatility
Average True Range — the typical bar movement size.
ATR measures how much a market typically moves in a single bar, expressed in raw price units. It's volatility you can actually use: not a percentage, not a z-score, but "this pair tends to travel about 0.0012 per bar right now." Traders reach for it because almost every honest risk decision — stop distance, position size, target width — needs to scale with how wild the market currently is, and ATR is the cleanest number for that.
How it works¶
For each bar, ATR first computes the True Range — the largest of three distances: the current high-to-low, the gap from this high to the previous close, and the gap from this low to the previous close. Taking the max captures overnight gaps and spikes that a plain high-minus-low would miss. The first bar has no prior close, so it falls back to high-minus-low (no leading gap in the series).
Those True Range values are then smoothed over Period bars (default 14). The Smoothing method picks how: rma is Wilder's original running average (an EMA with alpha = 1/period — the platform-standard default), sma is a plain rolling mean, and ema is a faster-reacting exponential. The output ATR is a single line, plotted in its own sub-pane since its scale is price-distance, not price-level.
When to use it¶
Reach for ATR whenever a strategy parameter should breathe with volatility: ATR-based stops that widen in chaos and tighten in calm, volatility-normalised position sizing, or filtering out trades when ranges are too dead to pay the spread. Avoid using ATR as a direction signal — it tells you the size of moves, never which way. A rising ATR in a range is just noise getting louder, not a breakout.
Example¶
Wire Bars → ATR, then feed the ATR series into a Stop Loss or risk block so the stop sits, say, 1.5× ATR from entry. Pair it with a directional trigger — e.g. an EMA crossover or RSI extreme — so ATR sizes the risk while the other block calls the entry. Backtest on real costs and you'll see ATR stops survive spikes that fixed-pip stops get knifed by.
Tips & gotchas¶
- Match the smoothing to your reference. MetaTrader and most charts use Wilder (
rma); switching toema/smashifts values subtly and can break export parity. - ATR is in price units, not pips or percent — multiply correctly when sizing, and remember it differs across instruments and quote currencies.
- It's a magnitude, never a direction. Don't infer trend from ATR alone.
- Low ATR ≠ safe. Quiet markets precede explosive moves; a tight ATR stop can get gapped through.
- Period sensitivity: short periods react fast but whip around; 14 is the durable default — change it deliberately, not by feel.
Related blocks¶
Inputs¶
| Socket | Type | What to wire in |
|---|---|---|
| Bars | bars |
Price bars |
Outputs¶
| Output | Type | Plots as | Description |
|---|---|---|---|
| ATR | series |
Line · sub-pane | ATR value in price units |
Parameters¶
| Parameter | Type | Default | What it does |
|---|---|---|---|
| Period | number · 2–200 | 14 |
|
| Smoothing | choice (rma, sma, ema) |
rma |
rma = Wilder (classic); sma = simple; ema = exponential |
| Line color | colour | #f4511e |
Reference auto-generated from the block catalog · category Indicators.