Home/Dovee/Function reference

atr

Average True Range

Reference/Volatility/Function

atr(length)

Wilder average of true range. Default 14. Risk unit: stop 2 atr is 2 × this ATR, stored as a price distance (points).

Parameters

NameTypeDescription
lengthint
default 14
Lookback in bars. Default 14.

Return value

series

Example

plot atr(14) as "ATR" orange
when close crosses above ema(21)
  buy
stop 2 atr

See also