ExtremeFrequency
How many swing highs and lows the recent bars hold, and how evenly spaced in time they fall.
A bar counts as a turn, a local high or low, when its high is strictly above, or its low strictly below, every bar within five bars on either side by default. A turn is only confirmed after those five bars have printed, and highs and lows are counted together without having to alternate. Over the last 100 bars the indicator reports how many turns there are, plus the average and spread of the bar gaps between consecutive turns.
How to read it
- All three lines sit in panes below the price on their own scale, not on the candles.
- A high count means price keeps turning over in short swings, which is choppy tape; a low count means a long run with few turns.
- The average gap is the rhythm of the turns: about 9 means a turn roughly every nine bars. A spread that rises while the average holds means the turns are getting irregular.
- A turn only appears after the bars that follow it, five minutes at the default, so the newest swing is always missing from the right edge.
What it outputs
- Turns in window
- Count of confirmed swing highs and lows whose bar falls in the last 100 bars. Mostly 5 to 14 on SPY one-minute bars with defaults.
- Average bars between turns
- Mean gap in bars between consecutive turns in the window. Mostly 6 to 16 on SPY with defaults. Reads 0 when fewer than two turns exist.
- Spread of gaps between turns
- Standard deviation of those gaps in bars. Low means evenly spaced turns; high means a mix of tight and long gaps. Mostly 3 to 11 on SPY with defaults.
Settings
- window
- How many bars back a turn still counts toward the totals. Longer windows hold more turns, so the count rises and the averages cover a longer span; shorter windows react faster but can drop to one or no turns, which zeroes the gap lines.
- lookback
- Bars on each side a bar must beat to count as a turn. Lower values (1 to 3) catch small wiggles, so the count rises and gaps shrink to a few bars; higher values (15 to 30) keep only major swings, so the count falls, gaps grow, and each turn appears later.
Pitfalls
- Ties do not count. A bar whose high or low exactly matches a neighbour's is not a turn, so flat tops and bottoms on quiet one-minute tape lower the count.
- Highs and lows are counted together and need not alternate, so a high can sit right after a low and give a one-bar gap. The average gap then mixes real swings with these tight pairs.
- Zeros on the gap lines mean fewer than two turns in the window, not zero spacing. On SPY with defaults they were rare: the 5th percentile of the average gap was 6.3 bars.