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.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.