OPEN-SOURCE SCRIPT
מעודכן Volume Profile S/R Zones (Peaks)

Volume Profile S/R Zones (Peaks) [Modified] is a volume-profile based support/resistance tool that converts significant volume nodes into tradable zones, then ranks them by how consistently price respected them over the selected lookback.
The script builds a rolling Volume Profile over a user-defined window (default 81 days) using a fixed number of price bins (default 33 rows). For each price bin it accumulates:
Total volume traded inside that price region
Bullish volume (lower-timeframe bars that close above open)
Bearish volume (implied as total − bullish)
The profile is plotted on the left side of the chart. All profile elements and zones are intentionally forced to a single clean style: white at 20% opacity (labels keep the chart’s default text color styling).
What it detects
1) High Volume Nodes (Peaks)
The script scans the profile rows and detects local maxima (HVNs). To prevent noisy “micro peaks,” a peak must pass two quality filters:
Relative-to-Max filter: peak volume must be at least a % of the largest node’s volume
Prominence filter: peak volume must exceed the average of nearby nodes by a minimum ratio
These filters remove weak nodes and keep only meaningful price areas where the market traded heavily.
2) Optional Low Volume Nodes (Troughs / LVNs)
When enabled, the script also detects local minima (LVNs). LVNs can behave like “barrier” areas where price rejects or moves quickly through.
Zones instead of lines
Each detected node becomes a zone, not a single price line.
Zone center = middle of the profile row
Zone thickness is adaptive:
Zone Half-Width = max(price bin size, ATR × fraction)
This makes zones robust to volatility and reduces “false breaks” caused by small wicks.
Zone merging (reduces clutter)
Nodes close to each other are merged into a single zone if their centers are within:
Merge Distance = ATR × fraction
The merged zone center becomes volume-weighted, so stronger nodes dominate.
Reliability scoring (the core feature)
Every zone is scored by replaying price interaction over the lookback window:
Events
Touch: candle range intersects the zone
Valid rejection: touch + close exits the zone in the expected direction
Confirmed break: close outside the zone, confirmed by:
distance beyond the zone (ATR-based), or
a minimum number of consecutive closes outside
Scoring
Touch adds points
Rejection adds more points
Confirmed break subtracts points
A decay factor is applied each bar so older interactions matter less than recent ones
This produces a practical ranking: zones that get repeatedly respected score high; zones that fail score low.
What you see on the chart
Left-side Volume Profile (white 20% opacity)
Top N strongest zones (ranked by score), drawn as horizontal bands across the chart
Right-side price labels showing each zone’s center price
Label tooltip includes:
zone center price
reliability score
current “role” (support-side vs resistance-side)
polarity bias (bull/bear/neutral based on volume delta)
Inputs and how to tune
Volume Profile
Profile Lookback (Days): defines market memory (short = tactical, long = structural)
Rows: resolution of price bins (higher = more detailed, lower = smoother)
Profile Width: visual width of the profile histogram
POC mode: optional regular or developing POC line
Zones
Top N Zones: limits clutter by plotting only the strongest zones
ATR Length / Zone Half-Width: controls how wide zones are
Prominence / Relative-to-Max: controls strictness of peak detection
Merge Distance: merges nearby zones into one
Scoring
Touch / Rejection / Break points
Decay factor (higher = longer memory)
Break confirmation settings (ATR distance + consecutive closes)
How to use (practical framework)
This indicator is designed to treat volume nodes as acceptance/rejection areas, not perfect lines:
Focus on high-score zones (they have the most recent evidence of being respected)
Use zones as:
potential accumulation/defense areas (support-side)
potential supply/ceiling areas (resistance-side)
Break confirmation is ATR-based to reduce false breakdowns/breakouts
For investing, many users run two instances:
long lookback (e.g., 252 days) for macro zones
shorter lookback (e.g., 81 days) for tactical entries
Notes / Limitations
The script is a historical structure tool, not a predictor.
Zones can shift gradually as the rolling lookback window updates.
Different assets (high volatility vs low volatility) may require different row counts and filter strictness.
License / Credits
Based on LuxAlgo’s Volume Profile foundation and heavily modified to add zone construction, merging, and reliability scoring.
Licensed under CC BY-NC-SA 4.0 (Attribution–NonCommercial–ShareAlike).
The script builds a rolling Volume Profile over a user-defined window (default 81 days) using a fixed number of price bins (default 33 rows). For each price bin it accumulates:
Total volume traded inside that price region
Bullish volume (lower-timeframe bars that close above open)
Bearish volume (implied as total − bullish)
The profile is plotted on the left side of the chart. All profile elements and zones are intentionally forced to a single clean style: white at 20% opacity (labels keep the chart’s default text color styling).
What it detects
1) High Volume Nodes (Peaks)
The script scans the profile rows and detects local maxima (HVNs). To prevent noisy “micro peaks,” a peak must pass two quality filters:
Relative-to-Max filter: peak volume must be at least a % of the largest node’s volume
Prominence filter: peak volume must exceed the average of nearby nodes by a minimum ratio
These filters remove weak nodes and keep only meaningful price areas where the market traded heavily.
2) Optional Low Volume Nodes (Troughs / LVNs)
When enabled, the script also detects local minima (LVNs). LVNs can behave like “barrier” areas where price rejects or moves quickly through.
Zones instead of lines
Each detected node becomes a zone, not a single price line.
Zone center = middle of the profile row
Zone thickness is adaptive:
Zone Half-Width = max(price bin size, ATR × fraction)
This makes zones robust to volatility and reduces “false breaks” caused by small wicks.
Zone merging (reduces clutter)
Nodes close to each other are merged into a single zone if their centers are within:
Merge Distance = ATR × fraction
The merged zone center becomes volume-weighted, so stronger nodes dominate.
Reliability scoring (the core feature)
Every zone is scored by replaying price interaction over the lookback window:
Events
Touch: candle range intersects the zone
Valid rejection: touch + close exits the zone in the expected direction
Confirmed break: close outside the zone, confirmed by:
distance beyond the zone (ATR-based), or
a minimum number of consecutive closes outside
Scoring
Touch adds points
Rejection adds more points
Confirmed break subtracts points
A decay factor is applied each bar so older interactions matter less than recent ones
This produces a practical ranking: zones that get repeatedly respected score high; zones that fail score low.
What you see on the chart
Left-side Volume Profile (white 20% opacity)
Top N strongest zones (ranked by score), drawn as horizontal bands across the chart
Right-side price labels showing each zone’s center price
Label tooltip includes:
zone center price
reliability score
current “role” (support-side vs resistance-side)
polarity bias (bull/bear/neutral based on volume delta)
Inputs and how to tune
Volume Profile
Profile Lookback (Days): defines market memory (short = tactical, long = structural)
Rows: resolution of price bins (higher = more detailed, lower = smoother)
Profile Width: visual width of the profile histogram
POC mode: optional regular or developing POC line
Zones
Top N Zones: limits clutter by plotting only the strongest zones
ATR Length / Zone Half-Width: controls how wide zones are
Prominence / Relative-to-Max: controls strictness of peak detection
Merge Distance: merges nearby zones into one
Scoring
Touch / Rejection / Break points
Decay factor (higher = longer memory)
Break confirmation settings (ATR distance + consecutive closes)
How to use (practical framework)
This indicator is designed to treat volume nodes as acceptance/rejection areas, not perfect lines:
Focus on high-score zones (they have the most recent evidence of being respected)
Use zones as:
potential accumulation/defense areas (support-side)
potential supply/ceiling areas (resistance-side)
Break confirmation is ATR-based to reduce false breakdowns/breakouts
For investing, many users run two instances:
long lookback (e.g., 252 days) for macro zones
shorter lookback (e.g., 81 days) for tactical entries
Notes / Limitations
The script is a historical structure tool, not a predictor.
Zones can shift gradually as the rolling lookback window updates.
Different assets (high volatility vs low volatility) may require different row counts and filter strictness.
License / Credits
Based on LuxAlgo’s Volume Profile foundation and heavily modified to add zone construction, merging, and reliability scoring.
Licensed under CC BY-NC-SA 4.0 (Attribution–NonCommercial–ShareAlike).
הערות שחרור
Volume Profile and Chip Distribution S/R Zone (Peak) — Update NotesNew: Chip Distribution (Cost Basis Approx) as an optional node source
This version adds an optional Chip Distribution engine that estimates where market participants are likely holding cost basis (“chips distribution”).
When enabled, peaks/LVNs are detected from estimated cost basis density instead of raw volume.
For stocks with fundamentals available, turnover is anchored to volume ÷ shares outstanding (quarterly shares outstanding series).
If shares outstanding is not available (CFDs/crypto/forex), the script automatically falls back to a relative-volume turnover approximation.
Why it matters: cost-basis clusters can behave like stronger behavioral support/resistance zones than raw volume nodes, especially around capitulation and bottoming attempts.
Improved: Peak zones → real S/R zones (not just highlights)
The indicator still detects volume profile peaks (HVNs), but now converts them into support/resistance zones using a more robust workflow:
Peak filtering (reduces noise):
Minimum relative-to-max threshold
Minimum prominence vs local neighborhood average
Zone width adapts to volatility using:
Zone half-width = max(price bin size, ATR * fraction)
Zone merging combines nearby levels into a single clean zone using ATR-based distance.
Result: fewer but higher-quality zones.
New: Zone ranking (Top N) using historical validation
Instead of drawing every detected node, zones are scored over the full lookback and the script displays only the Top N most reliable zones.
Scoring model:
Touch score: price overlaps the zone
Rejection score: touch + closes back inside/away in the expected direction
Break penalty: confirmed break via consecutive closes outside + ATR-distance confirmation
Score decay: older interactions count less than recent ones (prevents “ancient” levels dominating)
Result: the displayed zones are the ones that historically “behaved” like real S/R.
Updated: Cleaner visuals and consistent styling
All profile and zone elements use a consistent white / 20% opacity style so the tool stays readable across different chart themes.
Zone labels are displayed on the right edge at the zone center price for fast scanning.
Still included: Volume Profile + POC (Regular / Developing)
The base Volume Profile histogram and optional POC remain:
Regular POC line
Developing POC path (if enabled)
Practical usage notes
HVN Peak Zones = areas where participation/cost basis concentrated → often strong reaction zones.
LVNs (optional) = “low-participation gaps” → price often moves fast through them, but they can still act as boundaries.
A zone is “strong” if it scores highly due to:
multiple retests + rejections
few confirmed breaks
Compatibility / limitations
Chip Distribution works best on stocks where fundamentals are available.
On instruments without shares outstanding, the turnover model uses an approximation and should be treated as a heuristic.
This is not a predictive signal by itself — it is a structure map for S/R and cost-basis zones.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.