OPEN-SOURCE SCRIPT

ZEC Volume Profile Zone & Auto Pivot Trendline

1 103
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).

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.