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).
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.