True Range

True Range is a fundamental volatility measure that quantifies price movement for a single period. This comprehensive approach captures gaps and limit moves that a simple high-low range would miss.

It calculates the largest of three price differences: the current high minus the current low, the absolute value of the current high minus the previous close, or the absolute value of the current low minus the previous close.

Developed by J. Welles Wilder Jr. in 1978 as part of his Average True Range indicator, True Range has become a building block for many volatility-based indicators and trading systems. It provides a standardized way to measure volatility across different assets and timeframes.

What It Measures

True Range measures the actual volatility of an asset for a single period by finding the greatest price movement among three calculations: current high-low range, absolute distance from current high to previous close, and absolute distance from current low to previous close.

When to Use

Interpretation

Default Usage

use rust_ti::other_indicators::bulk::true_range;

pub fn main() {
    // fetch the data in your preferred way
    // let close = vec![...];  // previous close prices
    // let high = vec![...];   // high prices
    // let low = vec![...];    // low prices
    
    let tr = true_range(&close, &high, &low);
    println!("True Range: {:?}", tr);
}
import pytechnicalindicators as pti

# True Range calculation
tr = pti.other_indicators.bulk.true_range(close, high, low)
print("True Range:", tr)
import init, { 
    other_bulk_trueRange
} from 'https://cdn.jsdelivr.net/npm/ti-engine@latest/dist/web/ti_engine.js';

await init();

// fetch the data in your preferred way
// const close = [...];  // previous close prices
// const high = [...];   // high prices
// const low = [...];    // low prices

const tr = other_bulk_trueRange(close, high, low);
console.log("True Range:", tr);

Interactive Chart

Use the interactive playground below to explore how different parameters affect the indicator's behavior.