Sidechair

chart.is_range

Browse the reference

True when the chart shows Range bars, each closed once price has travelled a fixed range from the open.

Try it in the editor

Every finished Range bar spans the same high-to-low distance, so high - low is about the range setting and ta.atr() sits near it. Volatility is shown by how fast bars appear, not by their size.

Bars differ in duration, so do not assume a fixed number of bars per day.

Type

simple bool

Example

Pine ScriptAverage bar duration instead of bar heightOpen in editor
//@version=6
indicator("chart.is_range: minutes per bar", overlay = false)
plot(chart.is_range ? ta.sma((time - time[1]) / 60000, 20) : na, "Minutes per bar", color.orange)

See also

Runs on Sidechair