Lipi Reference Lipi

Functions

talib.tr()

It is used to measure market volatility

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


          indicator("True Range (TR)", overlay=false)
trValue = talib.tr()
plot(trValue, color=color.blue, title="True Range")