Momentum indicators

Williams' %R

Bounded oscillator locating the close within the recent high-low range.

Engine
TA-Lib
Function
WILLR
Input series
high, low, close
Outputs
1

How it works

Williams' %R compares the current close with the highest high and lowest low over the configured period and scales the result from 0 to -100.

Use case

Use Williams' %R as a bounded momentum feature for relative close position, overbought or oversold context, and range-position changes.

Parameters

ParameterTypeDefaultBounds or optionsDescription
Time Periodinteger142…100000Number of bars used to find the highest high and lowest low.

Outputs

OutputTypeDescription
Williams' %RnumberWilliams' %R value for the bar, normally ranging from -100 to 0.

Reading the result

Williams’ %R places the close relative to the recent high-low range using a negative scale. Readings near the top of the range are closer to zero; readings near the bottom are closer to the lower end of the scale.

Its interpretation is closely related to range-position oscillators, but the sign and orientation can differ. Verify the scale before combining it with a similarly shaped feature.

Common mistakes

  1. Reversing the meaning of the negative scale.
  2. Treating range extremes as immediate reversal signals.
  3. Comparing with Stochastic without accounting for orientation and smoothing differences.
  4. Ignoring unstable behavior when the recent high-low range is very small.

DataCat workflow notes

If a downstream model benefits from a zero-to-one scale, transform the value explicitly and retain the transformation definition. Do not overwrite the raw DataCat output or lose its quality state.

Resources

Search documentation

Search across 46 documentation pages.