Trend gap
How far the last 100 closes spread, as a share of price: low means a tight range, high a wide one.
Trend gap takes the highest and lowest close over the last 100 bars, the same high and low lines the Donchian trends indicator draws, and subtracts the low from the high. It divides that width by the current close, so the value is a fraction of price: 0.002 means the last 100 closes spanned 0.2% of price. Despite the name, it is not a gap between price and a trendline, and it carries no direction.
How to read it
- The line sits in its own pane below the price and is never below zero.
- On SPY one-minute bars over a month the median was about 0.2% of price. Below about 0.07% the range was unusually tight, above about 0.6% unusually wide.
- A rising line means the 100-bar range is widening. A falling line means price is being squeezed into a narrower band.
- It shows how much ground price covered, not which way: a wide line can come from a rally or a sell-off.
What it outputs
- Channel width
- The 100-bar close high minus the close low, divided by the current close. A fraction of price, zero or above.
Pitfalls
- The name suggests a gap between price and a trendline. The code measures channel width, so it cannot say which way a trend runs.
- The first 100 bars show no value while the window fills, about 0.5% of the sample, so the line starts late in a run.
- The 100-bar window is under two hours of one-minute trading, so the line reflects intraday swings rather than multi-day structure.