talib.tr

True range for the bar the script is on, taken from the chart’s own bars. The one argument, handle_na, is optional and selects how a missing value is treated.

talib.tr(series bool handle_na) → series float
ParameterTypeRequiredDescription
handle_naseries boolnoOptional flag selecting the treatment of a missing value.

Returns series float — A series float carrying the bar’s true range.

indicator("True range")
plot(talib.tr(true))

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade