Extreme gap
How wide the last 100 closes spread, as a share of their lowest close.
ExtremeGap takes the highest and lowest close over the last 100 bars and divides their difference by the lowest close. The result is a ratio, so 0.002 means the 100-bar range spans 0.2% of that low. It uses closing prices only and carries no direction, so it measures how wide the range is, not which way price is leaning.
How to read it
- The line sits in its own pane below the price and is never negative.
- Values are ratios: 0.002 means the last 100 closes spanned 0.2% of their low. On a sample month of SPY one-minute bars the median was about 0.002.
- Low readings, below about 0.0007, mean the last 100 closes stayed in a tight band. High readings, above about 0.006, mean price has covered a wide range recently.
- The line steps when a new high or low enters the 100-bar window and drops when an old extreme leaves it 100 bars later.
What it outputs
- Range as share of low
- The highest close minus the lowest close over the last 100 bars, divided by the lowest close. The result is never negative.
Pitfalls
- The name and docstring suggest trend strength, but this is only range width. A steady climb and a choppy sideways market can both give a high reading, so pair it with a direction indicator.
- It uses closing prices only, so an intrabar spike to a new high or low leaves no trace. Support and resistance here are just the 100-bar close extremes, not levels price has respected.
- The first 99 bars of loaded history show no value. Dividing by the lowest close means the same dollar range reads higher at a lower price, so compare values within one symbol.