OPEN-SOURCE SCRIPT
Minimal S/R Zones with Volume Strength

How it works
Pivot Detection
A pivot high is a candle whose high is greater than the highs of a certain number of candles before and after it.
A pivot low is a candle whose low is lower than the lows of a certain number of candles before and after it.
Parameters like Pivot Left Bars and Pivot Right Bars control how sensitive the pivots are.
Zone Creation
Pivot High → creates a Resistance zone.
Pivot Low → creates a Support zone.
Each zone is defined as a price range (top and bottom) and drawn horizontally for a given lookback length.
Volume Strength Filter
Volume Strength (%) = (Volume at Pivot / Volume SMA) × 100.
If the strength is below the minimum threshold (Min Strength %), the zone is ignored.
This ensures only pivots with significant trading activity create zones.
Zone Management
The indicator stores zones in arrays.
Max Zones per side prevents too many zones from being displayed at once.
Older zones are removed when new ones are added beyond the limit.
Visuals
Support zones → green label with Volume Strength %.
Resistance zones → red label with Volume Strength %.
Zones have semi-transparent boxes so price action remains visible.
Pivot Detection
A pivot high is a candle whose high is greater than the highs of a certain number of candles before and after it.
A pivot low is a candle whose low is lower than the lows of a certain number of candles before and after it.
Parameters like Pivot Left Bars and Pivot Right Bars control how sensitive the pivots are.
Zone Creation
Pivot High → creates a Resistance zone.
Pivot Low → creates a Support zone.
Each zone is defined as a price range (top and bottom) and drawn horizontally for a given lookback length.
Volume Strength Filter
Volume Strength (%) = (Volume at Pivot / Volume SMA) × 100.
If the strength is below the minimum threshold (Min Strength %), the zone is ignored.
This ensures only pivots with significant trading activity create zones.
Zone Management
The indicator stores zones in arrays.
Max Zones per side prevents too many zones from being displayed at once.
Older zones are removed when new ones are added beyond the limit.
Visuals
Support zones → green label with Volume Strength %.
Resistance zones → red label with Volume Strength %.
Zones have semi-transparent boxes so price action remains visible.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.