Skip to content

WILLR

Summary

Williams' %R momentum oscillator over a rolling period, bounded in [-100, 0]. Measures where the current close sits relative to the high-low range of the last N bars. Near 0 = close at period high (overbought); near -100 = close at period low (oversold).

Formula

%R = -100 * (highestHigh - close) / (highestHigh - lowestLow) over the trailing optInTimePeriod bars; if highestHigh == lowestLow, output 0.

Inputs

  • inPriceHLC — High, low, and close price series

Outputs

  • outReal — Williams' %R value in [-100, 0]

Parameters

  • optInTimePeriod — Lookback bars for the high/low range

Implementation

TA-Lib Definition: willr.c · willr.yaml

Native File
C ta_WILLR.c
Rust willr.rs
Java Core.java

TA-Lib is also available for Python, R and more using a wrapper.

Aliases

Williams %R, Williams Percent R, %R

See Also

STOCH · STOCHF · MINMAX