Williams %R w/ Bollinger Bands
Jul 20, 2022

The Williams %R w/ Bollinger Bands indicator provides a smoothed momentum oscillator combined with volatility bands to identify potential breakouts and trend exhaustion levels. By wrapping the Williams %R in Bollinger Bands, traders can better distinguish between normal price fluctuations and significant momentum shifts.
Usage
The indicator can be used to identify trend entries and reversals based on the relationship between the Williams %R line and its Bollinger Bands.
- Bullish Breakouts: Occur when the Williams %R line crosses above the upper Bollinger Band. This typically indicates strong upward momentum.
- Bearish Breakouts: Occur when the Williams %R line crosses below the lower Bollinger Band, indicating strong downward momentum.
- Mean Reversion: Traders may look for the oscillator to return to the middle band (basis) as a potential exit signal for momentum trades.
- Signals & Visualization: The script features optional bar coloring and visual plot shapes ("L" for long and "S" for short) to highlight band crossovers.
Details
The Williams Percent Range (%R) is a momentum indicator that measures overbought and oversold levels, originally developed by Larry Williams. It compares the current closing price to the high-low range over a specific lookback period.
In this implementation, the raw Williams %R value is normalized and smoothed using a selectable moving average (SMA, EMA, WMA, or RMA) to reduce noise. Bollinger Bands are then calculated based on this smoothed oscillator rather than the price action itself. This allows the bands to expand and contract based on the volatility of the momentum, providing dynamic overbought and oversold thresholds.
Settings
Williams %R Settings
- WPR Source: The price source used to calculate the Williams %R (default is Close).
- WPR Period: The lookback period used for the high-low range calculation.
- WPR Smoothing Period: The length of the moving average used to smooth the Williams %R.
- WPR Smoothing Type: Selects the calculation method for smoothing (EMA, WMA, RMA, or SMA).
Bollinger Bands Settings
- BB Period: The lookback period for the Bollinger Bands calculation.
- BB Multiplier: The standard deviation multiplier that determines the width of the bands.
- BB MA Type: The type of moving average used as the basis for the Bollinger Bands.
UI Options
- Color bars?: Enables or disables bar coloring on the chart based on the indicator's state.
- Show signals?: Toggles the visibility of "L" and "S" shapes on the oscillator pane.
FAQ
How do I interpret the Williams %R w/ Bollinger Bands?
When the oscillator line stays between the bands, momentum is considered range-bound. A move outside the bands suggests a volatility expansion in that direction, often signaling the start of a trend or a blow-off top/bottom.
Can I change the smoothing method?
Yes, the script allows you to choose between four different moving average types (SMA, EMA, WMA, and RMA) for both the oscillator smoothing and the Bollinger Band basis.
How do I access Williams %R w/ Bollinger Bands?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.