Functions
talib.atr()
Average true range over `length` bars. Read it as a measure of how far the market has been travelling, not as a price level. There is no `source` argument. The reading is built from the chart's own bars.
Syntax
talib.atr(series int length) → series float
Arguments
length required series int How many bars the average covers. Return Type
series float Example
indicator("ATR Indicator", overlay=false)
// Define ATR length
atrLength = input(14, title="ATR Length")
// Calculate ATR
atrValue = talib.atr(atrLength)
// Plot ATR
plot(atrValue, color=color.blue, title="ATR", linewidth=2)