The TR function in ProBuilder language calculates the True Range of a price, which is a measure used primarily in technical analysis to capture the volatility of a stock or commodity. The True Range is the greatest of the following three values: the difference between the current high and the current low; the difference between the previous close and the current high; and the difference between the previous close and the current low.
TR(price)
variable1 = TR(close)
This example assigns the True Range of the closing price to variable1.
By using the TR function, traders and analysts can more accurately gauge market behavior and potential price movements, making it a fundamental tool in the creation of various other technical indicators like the Average True Range (ATR).