OPEN-SOURCE SCRIPT
Confluence Zones [ThetaLoop]

Most charts carry more lines than decisions. A 200-day average here, a Fibonacci level there, a pivot from last spring, an anchored VWAP someone swears by. Each line on its own is a maybe. When four of them land inside the same narrow band of price, the maybe turns into a place that a lot of different traders, using a lot of different methods, are all watching at the same time.
This indicator does the stacking for you. It collects the levels most swing traders already use, measures how close they sit to each other, and merges the overlapping ones into shaded zones with a score. The score is simply the number of independent levels inside the zone. One line is a line. Three or four lines in one band is confluence.
Why combine them at all?
Every one of these tools is popular with a different group of traders. Moving averages are watched by trend followers, anchored VWAP by volume-based traders, Fibonacci by swing traders, pivots by price-action traders. A level that shows up in several of these methods at once is more likely to produce a reaction than any single line, because more participants have a reason to act there. Plotting all of them separately turns the chart into spaghetti. Clustering them answers the only question that matters: where do they agree?
What goes into the pot
- SMA 200, EMA 200 and SMA 50
- Anchored VWAP from the major high and from the major low of the lookback (re-anchors automatically whenever a new major high or low prints)
- Fibonacci 38.2 / 50 / 61.8 of the major swing (labels follow the swing direction)
- The last two confirmed pivot highs and pivot lows
Everything is calculated on the level timeframe (Daily by default), no matter which chart timeframe you are looking at. You can watch daily confluence while trading a 15-minute chart.
How zones are built
All levels are sorted by price. Starting from the lowest, every level within X x ATR of the first level of the current group joins that group (default 0.6 x ATR(14) of the level timeframe). Using ATR instead of a fixed percentage keeps the zone width proportional to the symbol's volatility: 0.6 ATR is narrow on a quiet utility and wide on a semiconductor. Groups below the minimum score are not drawn.
Reading the chart
- Green zone: below price, potential support
- Red zone: above price, potential resistance
- Orange zone: price is inside it right now
- Darker shading means a higher score
- The label shows the score and which levels formed the zone
- The table lists the six nearest zones with their distance in percent and in ATR units
The ATR distance is the more useful of the two. "4% away" means very different things on different symbols. "1.2 ATR away" means roughly the same thing everywhere.
Repainting
All levels come from the last completed bar of the level timeframe. Zones update once per new level-timeframe bar and do not move around during the current one. Pivots need "pivot strength" bars on their right side before they are confirmed, so they appear with that delay by design.
Alerts
Create an alert with the condition "Any alert() function call". It fires once per bar close when price closes inside a zone whose score is at or above the alert threshold.
Settings worth touching
- Level timeframe: D for swing trading, W for longer-term positioning
- Zone width: smaller gives fewer, tighter zones; larger merges more aggressively
- Minimum score: 2 shows every overlap, 3 shows only the strong areas
- Ignore levels farther than: keeps distant levels out of the clustering
Limitations
Confluence is a map, not a signal. A zone tells you where a reaction is more likely to be watched, not whether it will hold. Anchored VWAP relies on volume; on symbols without real volume data (some indices, forex) switch it off. On charts above the level timeframe, the chart timeframe is used instead.
This indicator does the stacking for you. It collects the levels most swing traders already use, measures how close they sit to each other, and merges the overlapping ones into shaded zones with a score. The score is simply the number of independent levels inside the zone. One line is a line. Three or four lines in one band is confluence.
Why combine them at all?
Every one of these tools is popular with a different group of traders. Moving averages are watched by trend followers, anchored VWAP by volume-based traders, Fibonacci by swing traders, pivots by price-action traders. A level that shows up in several of these methods at once is more likely to produce a reaction than any single line, because more participants have a reason to act there. Plotting all of them separately turns the chart into spaghetti. Clustering them answers the only question that matters: where do they agree?
What goes into the pot
- SMA 200, EMA 200 and SMA 50
- Anchored VWAP from the major high and from the major low of the lookback (re-anchors automatically whenever a new major high or low prints)
- Fibonacci 38.2 / 50 / 61.8 of the major swing (labels follow the swing direction)
- The last two confirmed pivot highs and pivot lows
Everything is calculated on the level timeframe (Daily by default), no matter which chart timeframe you are looking at. You can watch daily confluence while trading a 15-minute chart.
How zones are built
All levels are sorted by price. Starting from the lowest, every level within X x ATR of the first level of the current group joins that group (default 0.6 x ATR(14) of the level timeframe). Using ATR instead of a fixed percentage keeps the zone width proportional to the symbol's volatility: 0.6 ATR is narrow on a quiet utility and wide on a semiconductor. Groups below the minimum score are not drawn.
Reading the chart
- Green zone: below price, potential support
- Red zone: above price, potential resistance
- Orange zone: price is inside it right now
- Darker shading means a higher score
- The label shows the score and which levels formed the zone
- The table lists the six nearest zones with their distance in percent and in ATR units
The ATR distance is the more useful of the two. "4% away" means very different things on different symbols. "1.2 ATR away" means roughly the same thing everywhere.
Repainting
All levels come from the last completed bar of the level timeframe. Zones update once per new level-timeframe bar and do not move around during the current one. Pivots need "pivot strength" bars on their right side before they are confirmed, so they appear with that delay by design.
Alerts
Create an alert with the condition "Any alert() function call". It fires once per bar close when price closes inside a zone whose score is at or above the alert threshold.
Settings worth touching
- Level timeframe: D for swing trading, W for longer-term positioning
- Zone width: smaller gives fewer, tighter zones; larger merges more aggressively
- Minimum score: 2 shows every overlap, 3 shows only the strong areas
- Ignore levels farther than: keeps distant levels out of the clustering
Limitations
Confluence is a map, not a signal. A zone tells you where a reaction is more likely to be watched, not whether it will hold. Anchored VWAP relies on volume; on symbols without real volume data (some indices, forex) switch it off. On charts above the level timeframe, the chart timeframe is used instead.
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.
ThetaLoop | Algorithmic Options Research
🔍 Free CSP Score for any ticker — X-Ray Scanner:
thetaloop.app/xray
(Not financial advice)
🔍 Free CSP Score for any ticker — X-Ray Scanner:
thetaloop.app/xray
(Not financial advice)
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.
ThetaLoop | Algorithmic Options Research
🔍 Free CSP Score for any ticker — X-Ray Scanner:
thetaloop.app/xray
(Not financial advice)
🔍 Free CSP Score for any ticker — X-Ray Scanner:
thetaloop.app/xray
(Not financial advice)
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.