Functions
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.
Syntax
talib.tr(series bool handle_na) → series float
Arguments
handle_na series bool How NaN values are handled. if true, and previous day's close is NaN then tr would be calculated as current day high-low. Otherwise (if false) tr would return NaN in such cases. Also note, that ta.atr uses ta.tr(true). Return Type
series float Example
//@lipi=2
indicator("True Range (TR)", overlay=false)
trValue = talib.tr()
plot(trValue, color=color.blue, title="True Range")