OPEN-SOURCE SCRIPT
Dynamic Pivot Confluence Levels

Dynamic Pivot Confluence Levels – Visible Range
This indicator automatically detects the strongest price levels in your currently visible chart area by counting how many swing highs (maxima) and swing lows (minima) have occurred at or near the same price.
It draws one or two horizontal lines at the level(s) with the highest total number of turning points, helping you quickly identify high-probability support and resistance zones based on real market turning points rather than arbitrary calculations.
The indicator is fully dynamic — it recalculates automatically whenever you zoom or scroll the chart.
How it works
Detects swing highs and swing lows using a configurable pivot strength (left/right bars).
Groups nearby pivot prices into buckets so that small price differences are treated as the same level.
Counts the combined number of swing highs + swing lows in each price bucket within the visible chart range only.
Draws horizontal line(s) at the strongest level(s):
Single strongest level → Blue line
Multiple levels with the exact same highest count → Green line (higher price) + Red line (lower price)
Optional labels on the right side show the price and the number of pivots that formed the level (a measure of its strength).
Usage Tips
Works well on timeframes from 5 minutes to daily.
Zoom in for more localized, short-term levels. Zoom out to see broader, higher-timeframe confluence zones.
On highly volatile instruments (e.g. crypto) or lower timeframes, increase Group Ticks to avoid too many fragmented levels.
The lines and labels only consider pivots inside your current visible range. This makes the indicator very responsive to what you are actually looking at.
If you receive a runtime error (RE10045), reduce the Max Lookback Bars value (e.g. to 300 or 250).
The number shown in the label represents how many turning points (swing highs + swing lows) occurred at that level — higher numbers indicate stronger confluence.
Notes
This indicator is designed to highlight confluence zones where many market participants have previously changed direction. It does not repaint and only uses confirmed pivots within the visible chart window.
This indicator automatically detects the strongest price levels in your currently visible chart area by counting how many swing highs (maxima) and swing lows (minima) have occurred at or near the same price.
It draws one or two horizontal lines at the level(s) with the highest total number of turning points, helping you quickly identify high-probability support and resistance zones based on real market turning points rather than arbitrary calculations.
The indicator is fully dynamic — it recalculates automatically whenever you zoom or scroll the chart.
How it works
Detects swing highs and swing lows using a configurable pivot strength (left/right bars).
Groups nearby pivot prices into buckets so that small price differences are treated as the same level.
Counts the combined number of swing highs + swing lows in each price bucket within the visible chart range only.
Draws horizontal line(s) at the strongest level(s):
Single strongest level → Blue line
Multiple levels with the exact same highest count → Green line (higher price) + Red line (lower price)
Optional labels on the right side show the price and the number of pivots that formed the level (a measure of its strength).
Usage Tips
Works well on timeframes from 5 minutes to daily.
Zoom in for more localized, short-term levels. Zoom out to see broader, higher-timeframe confluence zones.
On highly volatile instruments (e.g. crypto) or lower timeframes, increase Group Ticks to avoid too many fragmented levels.
The lines and labels only consider pivots inside your current visible range. This makes the indicator very responsive to what you are actually looking at.
If you receive a runtime error (RE10045), reduce the Max Lookback Bars value (e.g. to 300 or 250).
The number shown in the label represents how many turning points (swing highs + swing lows) occurred at that level — higher numbers indicate stronger confluence.
Notes
This indicator is designed to highlight confluence zones where many market participants have previously changed direction. It does not repaint and only uses confirmed pivots within the visible chart window.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.