ta.atr
Average true range: rma(true range, length).
ta.atr(length: simple int) -> series float
Parameters
lengthsimple int: Number of bars, a whole number from 1 to 5000 (a fraction is cut off). Known before the first bar: a literal or an input, never a series. Outside 1 to 5000 the script stops with a runtime error. Wilder's average of the true range over this many bars; the first bar's true range is high - low.
Example
ta.atr(14)