OPEN-SOURCE SCRIPT

Minimal S/R Zones with Volume Strength

1 072
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.

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.