OPEN-SOURCE SCRIPT

Williams Percent Range pro

134
Williams Percent Range with Divergences (Williams %R Div)

Description:
This indicator enhances the traditional Williams %R oscillator by detecting both Regular Divergence and Hidden Divergence directly on the %R line. It helps traders spot potential trend reversals and trend continuations with high precision.

Key Features:

Williams %R calculation (standard, normalized between -100 and 0).

Pivot-based detection of divergences:

Regular Bullish Divergence: Price makes a lower low, but %R makes a higher low → potential upward reversal.

Regular Bearish Divergence: Price makes a higher high, but %R makes a lower high → potential downward reversal.

Hidden Bullish Divergence: Price makes a higher low, but %R makes a lower low → potential trend continuation upward.

Hidden Bearish Divergence: Price makes a lower high, but %R makes a higher high → potential trend continuation downward.

Customizable settings:

Enable/disable Regular and Hidden Divergences separately.

Customize colors for each divergence type.

Visual plotting:

Divergence signals are marked with labels (Bull, Bear, H Bull, H Bear) directly on the %R panel.

Built-in alert conditions:

Instant alerts when a Regular or Hidden Divergence is detected.

Usage Recommendation:

Regular Divergences are best used to anticipate trend reversals.

Hidden Divergences are useful for confirming trend continuations.

Combining divergence detection with key support/resistance levels, candlestick patterns, or moving averages can significantly enhance trading accuracy.

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.