Trading Indicator
Using Williams' Percent Range (W%R) in Automated Trading
Learn how W%R momentum rules can be translated into no-code automated trading strategies with Tradeworks.
Understanding Williams' Percent Range (W%R)
Williams' Percent Range (W%R) is a momentum oscillator that measures where the current closing price sits relative to the highest high and lowest low over a specified lookback period. Unlike RSI and Stochastic which range from 0 to 100, W%R ranges from 0 to -100, with extreme readings signaling potential reversal points in automated trading systems.
Below are William Percent Range strategies ready for automation in Tradeworks. If you're already trading W%R manually, you can automate your rules without coding.
How W%R Works in Automated Trading
- Range: 0 to -100 (negative values indicate price position within the period's range)
- Overbought: W%R is greater than -20 — near top of range (bearish signal)
- Oversold: W%R is less than -80 — near bottom of range (bullish signal)
- Lookback Period: Standard 14 periods, adjustable for sensitivity
- Zero Line: Not used — focus on extremes at -20 and -80 thresholds
Key Characteristics
- Williams Percent Range is a momentum indicator, ranging from 0 to -100
- Shows where the closing price is in relation to the highs and lows over the given period
- Default overbought level: -20 (bearish signal)
- Default oversold level: -80 (bullish signal)
- These values indicate the current price is near the highs/lows in the current period
Williams Percent Range is a momentum indicator, ranging from 0 to -100, which shows where the closing price of the current bar is in relation to the highs and lows over the given period. The default triggers for the overbought level (bearish signal) is -20 and -80 for the oversold level (bullish signal) – these values indicate that the current price is near the highs/lows in the current period.
Strategy 1: W%R Strategy Overbought/Oversold Reversal (-20/-80)
Range Trading
The W%R Extreme Reversal strategy tests trades when the indicator reaches oversold or overbought levels and price may reverse. Treat it as a range-market rule set that needs confirmation and backtesting.
Setup in Tradeworks:
- Condition (Long): Williams Percent Range (14) value crosses from below to above fixed value -80
- Condition (Short): Williams Percent Range (14) value crosses from above to below fixed value -20
- Add Average Directional Movement Index (ADX) (14) value is less than fixed value 25 (confirms ranging market)
Trade Management
These exits use Average True Range (ATR) period 14 as a volatility measure to set dynamic stop and target levels.
- Stop Loss Exit Signal:
- For longs: Set condition to 'Strategy symbol BID price is less than Previous bar close minus (1.5× ATR(14) value)'
- For shorts: Set condition to 'Strategy symbol ASK price is greater than Previous bar close plus (1.5× ATR(14) value)'
- Take Profit Exit Signal (option A — W%R midpoint):
- For longs: Set condition to 'Williams Percent Range (14) value crosses from below to above fixed value -50'
- For shorts: Set condition to 'Williams Percent Range (14) value crosses from above to below fixed value -50'
- Take Profit Exit Signal (option B — fixed risk/reward):
- For longs: Set condition to 'Strategy symbol BID price is greater than Previous bar close plus (3× ATR(14) value)'
- For shorts: Set condition to 'Strategy symbol ASK price is less than Previous bar close minus (3× ATR(14) value)'
Trade Management
- Stop Loss Exit Signal:
- For longs: Set condition to 'Strategy symbol BID price is less than Previous bar close minus (1.5× ATR(14) value)'
- For shorts: Set condition to 'Strategy symbol ASK price is greater than Previous bar close plus (1.5× ATR(14) value)'
- Take Profit Exit Signal (option A — W%R midpoint):
- For longs: Set condition to 'Williams Percent Range (14) value crosses from below to above fixed value -50'
- For shorts: Set condition to 'Williams Percent Range (14) value crosses from above to below fixed value -50'
- Take Profit Exit Signal (option B — fixed risk/reward):
- For longs: Set condition to 'Strategy symbol BID price is greater than Previous bar close plus (3× ATR(14) value)'
- For shorts: Set condition to 'Strategy symbol ASK price is less than Previous bar close minus (3× ATR(14) value)'
- Testing note: Compare chart intervals and instruments in backtesting before deciding where this setup fits your approach.
- Filter: Average Directional Movement Index (ADX) less than 25 confirms ranging market
Strategy 2: W%R Strategy Trend-Following with MA Filter
Confirmed Entry
The W%R Trend-Following Strategy combines W%R range-extreme rules with trend context from a Moving Average. This setup tests whether reversal-style entries should only be considered when trend context also aligns.
Setup in Tradeworks:
- Condition 1 (Long): Williams Percent Range (14) value crosses from below to above fixed value -80
- Condition 2 (Long): Strategy symbol ASK price is greater than Moving Average (50) value
- Logic: AND (both conditions must be true)
- Condition 1 (Short): Williams Percent Range (14) value crosses from above to below fixed value -20
- Condition 2 (Short): Strategy symbol BID price is less than Moving Average (50) value
- Logic: AND
- Variation: Test with Moving Average (20) for more aggressive entries, Moving Average (100) for more conservative filter
Trade Management
These exits use Average True Range (ATR) period 14 as a volatility measure to set dynamic stop and target levels.
- Stop Loss Exit Signal:
- For longs: Set condition to 'Strategy symbol BID price is less than Previous bar close minus (2× ATR(14) value)'
- For shorts: Set condition to 'Strategy symbol ASK price is greater than Previous bar close plus (2× ATR(14) value)'
- Take Profit Exit Signal (option A — W%R opposite extreme):
- For longs: Set condition to 'Williams Percent Range (14) value crosses from below to above fixed value -20'
- For shorts: Set condition to 'Williams Percent Range (14) value crosses from above to below fixed value -80'
- Take Profit Exit Signal (option B — fixed target):
- For longs: Set condition to 'Strategy symbol BID price is greater than Previous bar close plus (4× ATR(14) value)'
- For shorts: Set condition to 'Strategy symbol ASK price is less than Previous bar close minus (4× ATR(14) value)'
- Testing note: Compare chart intervals and instruments in backtesting before deciding where this setup fits your approach.
- Variation: Moving Average (20) for more aggressive, (100) for more conservative
For Bot Developers: Implementation Tips
Choosing W%R Parameters
Sensitivity
Shorter periods (8-10) for faster signals but more noise; longer periods (20-25) for smoother signals but more lag
Standard 14-period
Use as a common starting point before testing alternatives
Threshold Adjustment
Consider -15/-85 for more conservative entries, -25/-75 for more aggressive entries
Timeframe Adjustment
Match W%R period to chart timeframe — 14 for 1h-4h, 20 for daily
Combining with Other Indicators
- Moving Average: Use MA direction as a trend filter — only take W%R long signals when price is above the MA, and short signals when below
- Average True Range (ATR): Use for dynamic stop placement. Avoid W%R trades when ATR is unusually high (choppy markets)
- Relative Strength Index (RSI): Add RSI confirmation — W%R oversold + RSI below 35 strengthens the bullish signal
- Average Directional Movement Index (ADX): ADX below 25 can be tested for ranging conditions; ADX above 25 can be tested with the trend-following setup
- Stochastic Oscillator: Both measure range position — combining oversold signals from both reduces false entries
Important Notes
- W%R is often used as a range-bound indicator - it can identify extremes but may give premature signals in strong trends
- The negative scale (0 to -100) is mathematically equivalent to an inverted Stochastic %K — the logic is identical, only the visual scale differs
- W%R cannot detect divergence patterns automatically in Tradeworks. Traders can visually inspect for W%R/price divergence, but this pattern detection cannot be automated with the available operators
- Use crosses from below to above / from above to below for entry signals (event-based), not "is greater than / is less than" (continuous condition that would keep opening positions)
Manageable Beginner Setup
- Start Simple: Use W%R crossing -80 and -20 thresholds as entry signals
- Add Filter: Combine with Moving Average to avoid false signals in strong trends
- Test Extensively: Backtest with different W%R parameters across multiple currency pairs
- Paper Trade: Run W%R-enhanced strategies in simulation mode first
Questions
Frequently Asked Questions
Why does W%R use 0 to -100 instead of 0 to 100?
W%R uses 0 to -100 to represent how far below the period high the current close is. In practice: -20 = near top of range (sell zone), -80 = near bottom of range (buy zone). Tradeworks handles the negative values correctly in all conditions.
What's the difference between W%R and Stochastic?
Both measure price position within a range, but W%R uses 0 to -100 while Stochastic uses 0 to 100. W%R's extreme thresholds are -20/-80 while Stochastic's are 80/20. Mathematically they are inverses of each other. For automated trading, choose based on backtest performance or combine both for confirmation.
Can W%R work in trending markets?
W%R can give premature signals in strong trends. Solution: add a Moving Average filter (only take longs when price is above MA(50)) or add an ADX filter (ADX above 25 confirms trend, use W%R only for pullback entries in trend direction rather than counter-trend reversals).
How do I avoid false W%R signals in Tradeworks?
Add filters: 1) Moving Average trend confirmation (Strategy symbol ASK price is greater than Moving Average (50) value for longs), 2) ADX filter (ADX is less than 25 for range trading), 3) Use H4 or higher timeframes to reduce noise, 4) Use 'crosses from below to above' instead of 'is greater than' for event-based signals.
Should I adjust the -20/-80 thresholds?
Standard -20/-80 is a common starting point. Consider -15/-85 for more conservative entry tests or -25/-75 for more aggressive entry tests. Always backtest threshold changes before using them.
Try it in Tradeworks
Want to try Williams' Percent Range in Tradeworks?
Build and test Williams' Percent Range rules in a no-code strategy builder before deciding whether they fit your trading approach.
Trend Indicators
Trend indicators help traders identify the direction of market movement. They smooth price data to show whether an uptrend, downtrend, or sideways movement is occurring.
Simple Moving Average
Learn more →
Exponential Moving Average
Learn more →
Parabolic SAR
Learn more →
Heikin Ashi
Learn more →
High Low
Learn more →
Linear Regression
Learn more →
Two Pole Butterworth Filter
Learn more →
Ichimoku Kinko Hyo
Learn more →
Alligator
Learn more →
Envelopes
Learn more →
Doji Arrows
Learn more →
Oscillators
Oscillators are bounded indicators that move between set values. They help identify overbought and oversold conditions, momentum, and potential reversal points.
Relative Strength Index
Learn more →
Relative Momentum Index
Learn more →
Stochastic Oscillator
Learn more →
Moving Average Convergence/Divergence
Learn more →
Awesome Oscillator
Learn more →
Accelerator/Decelerator Oscillator
Learn more →
Commodity Channel Index
Learn more →
Relative Vigor Index
Learn more →
Williams' Percent Range
Learn more →
Gator Oscillator
Learn more →
DeMarker
Learn more →
Fisher Transform
Learn more →
Fisher CG
Learn more →
Laguerre RSI
Learn more →
Momentum
Learn more →
Moving Average of Oscillator
Learn more →
Volume Indicators
Volume indicators measure the strength of price movements by analyzing trading volume. They help confirm trends and identify potential reversals.
Volatility Indicators
Volatility indicators measure the rate of price change. They help traders set stop losses, determine risk levels, and identify potential breakouts.
Bill Williams Indicators
A collection of indicators developed by Bill Williams for trend identification, momentum analysis, and fractal pattern recognition.