How it works
Williams %R measures the distance from the top of the recent range down to the current close, scaled by the size of that range. It runs from 0 at the very top of the window to -100 at the very bottom. The inverted scale looks odd on first encounter but the logic is consistent: the number literally answers 'how far off the highs are we, in percent of range?'
Arithmetically it is the fast stochastic with the sign flipped and no smoothing — %R equals raw %K minus 100. Everything true of raw %K is therefore true here: it is a pure position measure, it discards magnitude, and it can whip across its entire scale in two bars. What makes it worth having as a separate entry is the way it is conventionally used. Because it is unsmoothed by default, %R is read for its behaviour at the boundaries rather than for crossovers, and traders watch how long it takes to return from an extreme rather than treating the extreme as a trigger.
The most durable technique built on it is a failure test rather than a threshold test. In an uptrend, %R will repeatedly reach 0 or near it. A rally that stalls at -30 and rolls over without tagging the top of the range says buyers could not push the close back to the highs, which is a genuine change. The symmetrical case in a downtrend — a decline that fails to reach -100 — is the same information about sellers.
The second common use is as a fast confirmation layer. Because it has no smoothing lag beyond the window itself, %R turns before RSI or a slow stochastic does, which makes it useful for timing an entry once a slower tool has established the direction. Used alone on its raw settings it produces far too many signals, and the standard fix is either to lengthen the window substantially or to require the reading to hold beyond the threshold for several consecutive bars.
Larry Williams's own framing was a short-horizon one: he used it to find points where a market had moved far enough from its recent highs that a bounce was likely within a handful of days, always inside a larger directional view rather than as a standalone system.
Calculation
The arithmetic in words, in the order it happens.
%R = -100 x (highest high over N bars - close) / (highest high over N bars - lowest low over N bars), with the current bar included in the range. The default N is 14. When the close equals the highest high the value is 0; when it equals the lowest low the value is -100. The identity with the stochastic is exact: %R = raw %K - 100, so the two lines are the same shape on different axes. Some platforms plot it on a 0 to 100 scale instead by dropping the minus sign, which reverses the meaning of the thresholds.
Source
An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.
Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.
Inputs
Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.
| Input | Default | What it changes |
|---|---|---|
| Length | 14 | Bars in the high-low window. Short settings such as 7 make it a scalping trigger that reaches the boundaries several times a session; 28 or more makes it a swing tool where a reading of 0 genuinely means a multi-week high. |
| Source | Close | The value measured against the range. Close is standard and is what makes the indicator a statement about where the bar settled rather than where it traded. Substituting hlc3 dampens single-bar extremes. |
| Overbought / oversold levels | -20 / -80 | Guide lines only. Because the raw line is unsmoothed, many users widen them to -10 and -90 so that only real range edges register, and add a persistence requirement of two or three bars. |
How to read it
What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.
- At or near 0
- The close is at the top of the N-bar range. In a range this is the upper boundary; in a trend it is simply what a strong market does every few days.
- At or near -100
- The close is at the bottom of the range. Interesting where the range boundary is structurally meaningful, and dangerous to fade in a downtrend.
- Rally stalls near -30 without reaching 0
- Buyers failed to return the close to the highs. One of the few genuinely early warnings the indicator gives, and the classic %R failure swing.
- Holds above -20 for many bars
- Every close is landing in the top fifth of the range. This is trend confirmation, not an overbought condition — the correct response is to stop looking for shorts.
- Snaps from -100 back above -80 quickly
- A brief test of the range low that was immediately rejected. Often the cleanest reversal cue the tool produces, especially at a level that already matters.
Limitations
Where this indicator misleads. None of these are fixed by a better parameter.
- It is unsmoothed by default and consequently very noisy: on intraday charts it can travel the full scale within a couple of bars and give a false impression of significance.
- Like every range-position oscillator it embeds in trends, sitting at 0 or -100 for long stretches while threshold rules fire against the move the whole way.
- It ignores magnitude entirely. A one-tick range and a violent expansion produce identical readings, so signals from compressed periods carry no weight.
- The inverted scale invites misreading, and some platforms publish it on a 0-100 axis instead, which silently reverses every threshold rule copied from elsewhere.
Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.