Skip to main content

Williams' %R in the Trade Rule Block

Williams' %R shows where the close lies within the recent high-low range, on a scale from 0 to −100.

Purpose of Williams' %R

Williams' %R, developed by Larry Williams, measures where the latest close lies within the highest high and lowest low of a set period. It moves between 0 and −100. Values above −20 are usually read as overbought and values below −80 as oversold.

How It Works

When you select Williams' %R in the Trade Rule block, you can configure it with the following settings:

Period of Williams' %R

  • The number of candles used for the high-low range (standard: 14).

Time Frame of Williams' %R

  • Sets the chart time frame for the Williams' %R calculation.

  • Can be replaced with a variable or input for quick testing and optimization.

Candle ID of Williams' %R

  • Defines which candle the calculation starts from.

  • 0: Current candle (still forming).

  • 1: Most recently closed candle.

  • Higher IDs refer to older candles.

Adjust of Williams' %R (Modify the Result)

  • Apply an adjustment to the calculated value by adding, subtracting, multiplying, or dividing by a number.

Example

If you set:

  • Period: 14

  • Candle ID: 1

You get the Williams' %R value of the most recently closed candle, between 0 and −100.

Williams' %R settings in the Profectus Trade Rule block

Use Cases

  • Detect overbought conditions above −20.

  • Detect oversold conditions below −80.

  • Time entries after a pullback in the direction of the main trend.

⚠ Tip: Williams' %R uses negative values. An oversold rule is therefore "Williams' %R < −80", not "< 20".

Did this answer your question?