OPEN-SOURCE SCRIPT
ZEC Volume Profile Zone & Auto Pivot Trendline

This is an indicator, not a strategy — it does not include backtested results, so the strategy-publishing rules on commissions, slippage, position sizing and sample size do not apply.
The script combines two original, algorithmically-derived components instead of manually drawn lines:
Volume profile zone. Over a user-set lookback window (default 90 bars), the script divides the traded price range into bins (default 24) and sums the volume that closed within each bin. The bin with the highest cumulative volume is plotted as a shaded zone. This identifies, on a rolling basis, the price area where the most trading activity has occurred — a high-liquidity zone that tends to act as dynamic support when price is above it and resistance when price is below it.
Auto-detected trendline. Using ta.pivotlow() with adjustable left/right bar sensitivity (default 5/5), the script tracks the two most recent confirmed swing lows and connects them with a line, projected forward. This removes the need to manually anchor a trendline to specific dates or prices, so the line updates as new pivots form and stays valid on any symbol or timeframe (the connection is skipped if the two pivots are more than the "max bars between pivots" setting apart, default 150, to avoid joining unrelated swings).
An optional, disabled-by-default pair of inputs lets a trader mark their own support/resistance levels from their own analysis if they want to combine that with the automatic zone and trendline.
Two alert conditions fire when price closes above the top of the auto-detected high-volume zone (potential bullish continuation) or below its bottom (potential bearish continuation).
The script combines two original, algorithmically-derived components instead of manually drawn lines:
Volume profile zone. Over a user-set lookback window (default 90 bars), the script divides the traded price range into bins (default 24) and sums the volume that closed within each bin. The bin with the highest cumulative volume is plotted as a shaded zone. This identifies, on a rolling basis, the price area where the most trading activity has occurred — a high-liquidity zone that tends to act as dynamic support when price is above it and resistance when price is below it.
Auto-detected trendline. Using ta.pivotlow() with adjustable left/right bar sensitivity (default 5/5), the script tracks the two most recent confirmed swing lows and connects them with a line, projected forward. This removes the need to manually anchor a trendline to specific dates or prices, so the line updates as new pivots form and stays valid on any symbol or timeframe (the connection is skipped if the two pivots are more than the "max bars between pivots" setting apart, default 150, to avoid joining unrelated swings).
An optional, disabled-by-default pair of inputs lets a trader mark their own support/resistance levels from their own analysis if they want to combine that with the automatic zone and trendline.
Two alert conditions fire when price closes above the top of the auto-detected high-volume zone (potential bullish continuation) or below its bottom (potential bearish continuation).
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.