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
- Volatility Assessment: Understanding current market volatility levels for risk management
- Position Sizing: Adjusting position sizes based on recent volatility
- Stop Loss Placement: Setting stops at multiples of True Range to avoid premature exits
- Building Block: Foundation for Average True Range (ATR) and other volatility indicators
- Gap Analysis: Identifying when gaps create larger price movements than intraday ranges
Interpretation
- Higher Values: Indicate increased volatility and larger price movements
- Lower Values: Suggest decreased volatility and smaller price movements
- Sudden Spikes: Often occur during gaps, breakouts, or significant news events
- Relative Comparison: Most useful when compared to recent values or averaged over time
- Asset-Specific: Raw True Range values vary by asset price level; higher-priced assets typically show larger True Range values
- No Period Parameter: Unlike most indicators, True Range is calculated independently for each bar without looking at historical periods
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.