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).
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。