Knowledge · Terms · ATR

ATR

Indicator indicator
Average True Range
Measures the average true range of the last N periods — a pure volatility indicator with no directional information.
Example chart
BTC/USDT · 4h · last 90 days
Loading chart data…

What is ATR?

Also from J. Welles Wilder (1978). The True Range of a candle is the maximum of:

TR = max(
  high − low,
  |high − close_prev|,
  |low  − close_prev|
)

The Average True Range is the average (usually 14 periods) of the True Range. It measures volatility in price units — not in percent.

What it is used for

ATR has no direction. It answers only one question: "how far does the price move per candle?"

  • Stop-loss distance — stop = entry − n · ATR (n usually 1.5–3). This adapts the stop to current volatility instead of a fixed dollar amount.
  • Trailing stop — Chandelier Exit, Supertrend, and many others.
  • Position sizing — risk per trade = account-% · risk_usd; position = risk_usd / (ATR · multiplier). Ensures every trade carries the same risk.
  • Volatility filter — if ATR is too low relative to its 20-period average, don't trade at all.

How Botty uses ATR

indicators/compute.py computes ATR(14) as a rolling mean of the True Range. config.py defines ATR_STOP_MULTIPLIER (initial stop) and ATR_TRAIL_MULTIPLIER (trailing stop). The stop logic in execution/ places the stop ATR · multiplier away from the entry.

Practical notes

  • ATR expands in crashes and collapses in calm phases. On 1m candles it is much smaller than on 1d — interpretation is timeframe-dependent.
  • For cross-asset comparisons prefer ATR% (ATR / close) over absolute ATR.