When a market rises strongly, its closes stay near the highest high of the last candles; when it weakens, the close drifts away from it. Williams %R measures that distance: where the close sits relative to the recent high, within the range between the high and the low. It is a position indicator, useful to spot exhaustion, but never a forecast.
How it is calculated
For each candle, Algo Signals takes the last 14 (period setting). Williams %R = โ100 ร (highest high โ close) รท (highest high โ lowest low). It therefore lives between โ100 and 0: 0 if the close is at the high, โ100 if it is at the low, โ50 in the middle (the value used if the range is zero).
- Close at the highest high of the 14 candles: %R = 0.
- Close at the lowest low: %R = โ100. In the middle of the range: โ50.
- It is the same calculation as the stochasticโs raw %K, shifted by 100: %R = raw %K โ 100.

Reading the signal in Algo Signals
The โSignalโ setting (sigMode) has two modes. Mode 1 (default): bias. Bullish if %R is above โ50, bearish below; the signal appears as it crosses โ50. Mode 2: return from the extremes. Buy when %R comes back above โ80 (it leaves oversold), sell when it falls back below โ20 (it leaves overbought); the state is kept until the opposite event.

The settings
- Period (period): 14 by default (2 to 100). Shorter, %R moves fast and often touches the extremes; longer, it is calmer.
- Signal (sigMode): 1 = bias around โ50 (default), 2 = return from the extremes.
- Oversold (wOs): 80 by default (51 to 99), i.e. the โ80 level. Overbought (wOb): 20 by default (1 to 49), i.e. the โ20 level. They only serve mode 2.
- These values are conventions: a โperfectโ setting on the past does not repeat.
The pitfalls
In a strong uptrend, %R can stay near 0 for a long time: each small dip takes it back below โ20 and produces a sell while the price keeps rising. The reverse holds in a downtrend. Being near 0 means โthe close is near the highโ, not โthe fall is comingโ. In mode 1, a flat market makes %R oscillate around โ50 and multiplies signals. On spike indices (Boom/Crash), a sudden spike changes the windowโs high or low at once.

Key takeaways
- Williams %R = โ100 ร (highest high โ close) รท (highest high โ lowest low) over 14 candles by default; between โ100 and 0.
- Mode 1: bias around โ50. Mode 2: buy on the return above โ80, sell on the return below โ20.
- Near 0 or โ100 does not mean reversal: in a strong trend it can stay there.
- Combine it with a trend filter (ADX, MA 200) or another oscillator to require several confirmations.
๐ Lesson test
Log in to take this lessonโs test. Once you have passed all the tests, you will receive a certificate in your name.
Log inThese lessons are for understanding and are not investment advice. No method guarantees winning.