全職奶爸

Williams %R Indicator: Formula, 14-Period Settings and TradingView Guide

Williams percent range: negative scale, settings and TradingView guide

TRADINGVIEW · RANGE POSITION AND MOMENTUM

Williams %R measures where the latest close sits inside a recent high–low range. Its negative scale runs from 0 at the range high to -100 at the range low. TradingView’s baseline uses Length 14 and Source Close, with reference levels at -20, -50, and -80. A reading near zero means the close is near the recent high. It does not mean a reversal is due, and a rising reading does not always require a rising close.

Read the negative scale as a position inside a range

Larry Williams developed Williams %R, also called Williams Percent Range. The indicator is commonly classified as a momentum oscillator. Its immediate calculation answers a narrower question: how far below the selected window’s highest high is the latest close, relative to the entire window’s range?

A value of -10 places the close near the high end. A value of -90 places it near the low end. The negative sign does not make every reading a bearish signal. As the close moves upward within unchanged boundaries, %R also moves upward, toward zero.

The familiar overbought and oversold labels describe those extreme positions. They do not measure fundamental value or set a deadline for price to turn. An advancing market can keep closing near successive highs; a declining market can keep closing near successive lows.

%R valueClose position within the rangeCommon reference
0At the highest highUpper endpoint
-2080% of the distance up from the lowest lowUpper band
-50Halfway between highest high and lowest lowMiddle level
-8020% of the distance up from the lowest lowLower band
-100At the lowest lowLower endpoint

These positions assume the standard closing-price calculation and a nonzero high–low range. Define how your rule treats an exact boundary. “Above -20” and “at or above -20” give different results when the value equals -20. Rounded display text can also hide a small difference around a threshold.

The Williams %R formula

Choose a lookback of N bars, including the current bar. Find the highest high, HH, and the lowest low, LL, inside that window. Let C be the current close. Then calculate:

Williams %R = -100 × (HH − C) ÷ (HH − LL)

The numerator is the distance down from the highest high to the close. The denominator is the whole window’s range. Dividing one price distance by another removes the price units. The result is a normalized position, rather than a number of ticks, a percentage return, or an amount of money.

If HH is 120, LL is 100, and C is 116, the distance below the high is 4 and the range is 20. The result is -100 × 4 ÷ 20 = -20. Changing the close to 104 gives -80. At C = 110, halfway through that same range, %R is -50.

A 14-period calculation uses fourteen chart bars. On a five-minute chart, that means fourteen five-minute observations under the selected session. On a daily chart, it means fourteen daily observations. Session breaks and missing bars can make the elapsed clock time differ from a simple count of continuous minutes.

If HH equals LL, the denominator is zero and the fraction has no defined value. Treat that case separately in a reproduction; assigning -50 would introduce a convention that is absent from the fraction itself. Keep the platform’s handling of flat windows and its available starting history consistent when comparing outputs.

Work through a rolling six-bar example

Use a hypothetical three-bar lookback so the moving boundaries stay visible. This shorter length is an arithmetic example, rather than a recommendation for a trading method. The table starts reporting values only after three complete bars are available in this reference sample.

BarHigh / Low / CloseRolling HH / LLWilliams %RRaw Stochastic %K
1110 / 95 / 100———
2100 / 90 / 94———
3100 / 92 / 99110 / 90-5545
4100 / 94 / 99100 / 90-1090
5102 / 98 / 100102 / 92-2080
6101 / 97 / 98102 / 94-5050

At bar 3, the active window contains bars 1, 2, and 3. Its highest high is 110 and lowest low is 90. The close is 99, giving -100 × (110 − 99) ÷ (110 − 90) = -55. The close is slightly below the midpoint of that twenty-point range.

At bar 4, the window moves to bars 2, 3, and 4. Bar 1’s high of 110 disappears from the calculation. The highest remaining high is 100, the lowest low stays 90, and the close remains 99. The new result is -100 × (100 − 99) ÷ 10 = -10.

Same close, different rolling rangeHypothetical length3 sample. At bar3, highest110 and lowest90 place close99 at Williams percent range minus55. At bar4, the old high expires and highest100/lowest90 place unchanged close99 at minus10. Both rulers use the same price spacing.Same close, different rolling rangeHYPOTHETICAL · Length 3 · Both closes are 99BAR 3 · HH 110 / LL 90BAR 4 · HH 100 / LL 90Close 99Shorter rangeClose 99Williams %R = -55Williams %R = -10The old high of 110 is outside bar 4’s active three-bar window.

The oscillator has crossed both -50 and -20 without an increase in the close. Its reference range changed. A threshold crossing can therefore reflect a change in the measuring window as well as a change in the current price.

You can express the same change in price units. With boundaries 110 and 90, the -20 level corresponds to a close of 106. With boundaries 100 and 90, it corresponds to a close of 98. The close of 99 lies below the first threshold and above the second.

At bar 5, the low of 90 leaves the window and a new high of 102 enters it. The resulting boundaries are 102 and 92; close 100 gives -20. At bar 6, the boundaries become 102 and 94, so close 98 gives -50. Recalculate both boundaries on every bar rather than carrying the old range forward.

The Donchian Channel guide explains rolling high–low boundaries on the price chart. Those boundaries help you see what changed when a range-position oscillator moves sharply.

-50 marks the range midpoint, not the closing average

Set the formula equal to -50 and solve for C. The answer is C = (HH + LL) ÷ 2. It uses two extremes, whereas a closing-price simple moving average uses all the selected closes. They can give different comparisons on the same bar.

At bar 3, the three closes are 100, 94, and 99. Their average is about 97.67. The current close of 99 is above that average, yet it is below the range midpoint of 100. Williams %R is -55, correctly placing the close in the lower half of the high–low range.

That example separates “above the average close” from “above the middle of the range.” A rule that combines an average with %R has two explicitly different conditions to evaluate. Replacing one with the other changes the rule.

Williams %R and raw Stochastic use the same position

Raw Stochastic measures upward from the lowest low: raw %K = 100 × (C − LL) ÷ (HH − LL). Williams %R measures downward from the highest high and uses a negative scale. For matching data, timeframe, lookback, and closing-price source, their relationship is exact:

Williams %R = raw Stochastic %K − 100

In the sample, raw %K 45 corresponds to %R -55; raw %K 90 corresponds to %R -10. Both lines rise when the close moves toward the range high under unchanged boundaries. Their shapes match, with a vertical scale shift of 100.

Raw %K and %R use the same positionWith matching high-low-close data and length, raw Stochastic percentK values100,80,50,20,0 correspond to Williams percentR values0,minus20,minus50,minus80,minus100. Both rise as the close moves toward the high within fixed boundaries. This comparison uses raw, unsmoothed values.Raw %K and %R use the same positionMATCHED DATA · Same timeframe, lookback and Close sourceClose positionRaw %KWilliams %RAt the high100080% up from the low80-20Range midpoint50-5020% up from the low20-80At the low0-100Williams %R = raw %K − 100. Match smoothing before comparing.

Displaying both raw versions does not provide a second independent confirmation. They express the same normalized position. A rule requiring raw %K above 80 and matching %R above -20 repeats the same condition in two scales.

The comparison changes when a platform smooths %K. At bar 6, the latest three raw readings are 90, 80, and 50. Their three-bar simple average is 73.33. The current raw %R is -50, so subtracting 100 from that smoothed %K gives -26.67 rather than the current raw value.

If you also apply the same three-bar simple average to %R, the matching readings -10, -20, and -50 average to -26.67. The translation holds when you match the operation and observations. Comparing a raw line with a smoothed line silently changes the comparison.

The Stochastic Oscillator guide distinguishes raw readings, smoothed %K, and %D. Record that version alongside the period numbers before deciding that two platforms disagree.

How Williams %R differs from RSI

Williams %R compares a close with rolling price extremes. RSI compares smoothed upward and downward closing-price changes. One asks where the close sits inside a range; the other uses the balance of directional changes under its smoothing method.

Both can remain near an extreme during a sustained trend, but their thresholds and numbers are not interchangeable. A %R reading of -20 does not imply a particular RSI reading. The RSI indicator guide works through that separate calculation and its signal rules.

Combining them creates a method with additional conditions to test. Both still derive from price, so agreement alone does not establish independent evidence or a higher probability of success. Name the condition each indicator contributes and count the opportunities it removes.

Set up Williams Percent Range in TradingView

Choose the symbol and exchange, ordinary candle type, session, and chart interval. Open Indicators, metrics, and strategies, search for Williams %R, and select the built-in Williams Percent Range indicator. Similar community names can refer to added smoothing, arrows, or different rules.

Open the settings gear beside its name. In Inputs, use Length 14 and Source Close for the standard closing-price baseline. Keep Source at Close when reproducing the formula and raw Stochastic comparisons in this guide.

TradingView Williams percent range Inputs with Length 14, Source Close, Timeframe Chart and Wait for timeframe closes checked
Match Length and Source by name. Timeframe selects the calculation bars; the checkbox controls waiting for that timeframe to close. Open the image for the full interface.

Set Timeframe to Chart for a chart-timeframe calculation. A one-hour calculation displayed on a five-minute chart uses one-hour bars. Fourteen of those observations are different from fourteen five-minute bars, even if the two lines appear in the same panel.

Use Wait for timeframe closes when your method requires the selected calculation timeframe’s completed values. A five-minute candle can finish while the one-hour bar remains open. Keep the signal’s availability time aligned with the timeframe that supplied its inputs.

In Style, identify Upper Band -20, Middle Level -50, and Lower Band -80. Adjust the %R line’s color and thickness for readability. These horizontal levels are references, rather than automatic orders.

TradingView’s Williams %R controls describe the named inputs and display options. The broader TradingView indicators guide covers finding built-ins and recording a reproducible setup.

Define the crossing you intend to trade

A reading inside an extreme zone is a state. Entering that zone is an event. Leaving it is another event. For example, a rule for leaving oversold territory might require the previous completed value at or below -80 and the current completed value above -80. That differs from buying whenever the value remains below -80.

Bars 4, 5, and 6 in the sample give -10, -20, and -50. An event requiring the previous value at or above -20 and the current value below -20 occurs at bar 6, rather than bar 5. Requiring a strictly greater previous value would miss that transition because bar 5 equals the boundary. Decide how an exact touch affects the sequence before counting signals.

Use the underlying values when applying that rule. Readings of -19.996 and -20.004 can both display as -20.00 with two decimal places, yet they sit on opposite sides of -20. Increasing display precision helps inspect the difference; it does not change the calculation or establish a new entry rule.

A bearish counterpart might require a previous value at or above -20 and a current value below -20. Write the exact inequalities and evaluation time. If your method also requires a price break, specify its price level and when that condition becomes known.

Remember the unchanged-close example. Oscillator thresholds are fixed numbers, but the price levels corresponding to them move with HH and LL. Inspect the rolling range before describing every upward %R cross as a fresh increase in the closing price.

Momentum failure describes a sequence. Imagine hypothetical readings near the upper zone at -8 and -12, followed by -55. A recovery to -30 and -24 approaches the upper zone without reaching it; a subsequent fall to -58 confirms that the attempted recovery turned lower under that chosen observation rule.

The failed recovery is visible after the later turn, rather than being known in advance at the recovery’s highest point. A backtest must use the time when its confirmation becomes available. Define a maximum waiting period if your method requires the events to occur close together.

Divergence also needs matched observations. Compare corresponding price swings with the chosen oscillator swings, record any right-hand confirmation bars, and keep the lookback fixed. A changed high–low window can alter the normalized position; divergence does not supply a countdown to the next reversal.

Test period changes and execution separately

A shorter lookback removes old extremes sooner, while a longer lookback retains more history. The effect depends on which extreme enters or leaves. Record a baseline before changing Length, and compare complete sequences rather than assuming a shorter number always identifies a useful turn earlier.

Keep the instrument, session, chart type, source, thresholds, entry, and exit rules fixed during a parameter comparison. Include strong trends where extreme readings persist, sideways periods with repeated crossings, and signals that fail quickly. Keep a development sample separate from an untouched evaluation sample.

A confirmed oscillator signal does not specify an obtainable fill. Record when the bar closed, when an order was sent, its type, and its actual or simulated execution assumptions. If synthetic candles supply signals, distinguish those calculated values from market prices available for fills.

While a bar develops, its close and high–low window can change. A displayed crossing can appear and disappear before confirmation. Save the decision timestamp and whether the selected calculation bar had finished when comparing a live observation with a historical chart.

Choose a price invalidation before choosing quantity

An oscillator level supplies no price-distance risk budget. Before using a signal, define the entry and the price that invalidates the trade. Measure that distance, account for valid tick rounding and any chosen buffer, then multiply by money value per unit and quantity.

For a hypothetical instrument worth $5 per point, a four-point planned distance with two units represents $40 of price risk before commissions and execution allowances. A %R reading of -80 does not tell you whether that distance is four points or forty.

The position sizing calculator guide explains those units. Reduce quantity or skip a setup when its defined risk exceeds the budget. For a prop firm plan, also apply its current drawdown, position limits, and permitted trading conditions to the same decision.

When evaluating results, record losing signals and skipped trades alongside winners. Compare gains, losses, costs, trade count, and drawdown under the complete rules. Neither a selected trend nor agreement between raw %K and %R establishes a profitable method.

Compare HDP discounts

Lucid 30% · Tradeify 30% · TPT 50%.

See current offers ↗

Eligible partner plans only.

Williams %R FAQ

What is the Williams %R indicator?

It measures the latest close’s position inside a selected high–low range. The standard negative scale runs from 0 at the range high to -100 at the range low, assuming a nonzero range and the closing-price calculation.

What is the Williams %R formula?

Calculate -100 multiplied by highest high minus current close, divided by highest high minus lowest low. Use the same rolling lookback for both extremes. A zero denominator needs separate handling.

Why does Williams %R use negative numbers?

The formula measures down from the highest high and multiplies by -100. Values closer to zero put the close nearer the range high. The negative sign does not make every reading bearish.

What do -20 and -80 mean?

At -20, the close is 80% of the way up from the range low; at -80, it is 20% of the way up. These are common overbought and oversold reference levels, rather than automatic reversal instructions.

Does -50 mean price is at its moving average?

No. It means the close is at the midpoint between the selected highest high and lowest low. In the example, close 99 is above its three-close average of 97.67 while below the range midpoint of 100.

Can %R cross a threshold without the close rising?

Yes. When an old high leaves the sample, unchanged close 99 produces -55 with boundaries 110/90 and -10 with boundaries 100/90. The reference range changed even though the close did not.

How is Williams %R related to Stochastic?

For matching data, timeframe, lookback, and closing-price source, Williams %R equals raw Stochastic %K minus 100. The shapes match, and using both raw versions repeats the same normalized position.

Does %R equal a smoothed %K minus 100?

Match the smoothing first. In the sample, raw %R is -50 while three-bar smoothed %K minus 100 is -26.67. Applying the same three-bar average to %R produces the matching -26.67.

Is Williams %R better than RSI?

They calculate different quantities. %R uses a close’s position within rolling extremes; RSI uses smoothed directional closing-price changes. Compare their contribution under a defined trading method rather than assigning a universal winner.

What are the standard TradingView settings?

The baseline is Length 14 and Source Close. The display has Upper Band -20, Middle Level -50, and Lower Band -80. Use Timeframe Chart for a chart-timeframe calculation.

What are the best Williams %R settings for day trading?

No universal best set applies. Record the baseline, session, source, thresholds, entries, exits, and costs before comparing alternatives. A shorter lookback changes which extremes remain in the window; it does not guarantee a better signal.

Does overbought mean I should sell immediately?

An upper-zone reading describes a close near the selected range high. It can persist during an advance. Define a price and oscillator event, confirmation time, and risk plan before treating a reading as a trade.

What is a Williams %R momentum failure?

It is a sequence in which the oscillator leaves an extreme zone, attempts to return, and turns without re-entering it. Define the later confirmation and waiting period so the method does not assume knowledge of a future turn.

Can Williams %R change before the bar closes?

Yes. The developing close and rolling extremes can change the latest value. For a confirmed method, use the selected calculation timeframe’s completed bar, which can differ from the smaller chart bar displaying it.