Channel width
How wide the last 100 closes ranged, as a percent of price: low means a tight squeeze, high means wide swings.
ChannelWidth finds the highest and lowest close over the last 100 bars, then expresses the gap between them as a percent of the current close. Dividing by price makes the reading comparable across price levels and over time. The channel is built from closes only, so the high and low wicks of each bar do not widen it. Values stay blank until 100 bars of history exist.
How to read it
- The line sits in its own pane below the price and never drops below zero.
- At 0.07 or less, the last 100 closes stayed in a tight band; that is the bottom 5% on SPY in the sample.
- At 0.6 or more, the same closes swung across a wide band; that is the top 5%.
- On SPY near 765, a reading of 0.2 is roughly $1.50 between the highest and lowest close of the window.
- The line measures how wide the range is, not which way price will break out.
What it outputs
- Channel width (% of close)
- Gap between the highest and lowest close of the last 100 bars, as a percent of the current close.
Pitfalls
- The first 99 bars of a run are blank while the 100-bar window fills, about 0.5% of the sample.
- The range uses closing prices only, so an intrabar spike that reverses does not widen it, unlike a high-low channel.
- The name suggests Keltner or Bollinger bands, but this is a Donchian-style close range; the cut-offs above come from one month of SPY and shift with the symbol and the regime.