ta.range
Read the high to low range of a bar, including bars of a declared series.
ta.range(bars)The bar's range: high - low, read from bars. On the chart's own bars it is the same as high - low. It has an id for ta.range(d) on a declared series, where the fields of another clock cannot be spelled as plain arithmetic.
Parameters
A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.
| Name | Kind | Type | Unit | Default | Range | Description |
|---|---|---|---|---|---|---|
bars | Constant | bars | bars | na | - | Which bars to read: a declared series, or na for the chart's own. |
Output
| Name | Type | Unit |
|---|---|---|
value | number | - |
Warm-up and missing values
- Warm-up
- 1 bar.
- Missing values
- na while
barshas no bar available. Never na for a bar that exists, because a high and a low always exist.
Example
ta.range()plot(ta.range(), "Range")