OPEN-SOURCE SCRIPT

Dynamic Pivot Confluence Levels

558
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.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.