TRANGE
Summary
True Range: the greatest of today's high-low span and the two gaps between yesterday's close and today's high/low. Base volatility measure used to build ATR/NATR. Larger values mean wider or gappier bars (higher volatility).
Formula
TR = max( high - low, |prevClose - high|, |prevClose - low| )
Notes
- The first bar produces no value because it has no prior close; unlike some definitions, it does not fall back to the high-low range for that bar.
Inputs
inPriceHLC— High, low, and close price series
Outputs
outReal— True Range value per bar
Implementation
TA-Lib Definition: trange.c · trange.yaml
| Native | File |
|---|---|
| C | ta_TRANGE.c |
| Rust | trange.rs |
| Java | Core.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
True Range, TR
See Also
References
- J. Welles Wilder, New Concepts in Technical Trading Systems, Trend Research (ISBN 0894590278)