The williams %r indicator plots a single line in a pane under the price chart. It shows where the latest close sits inside the recent high-low range. Zero means the close matched the highest high of that window. Minus one hundred means it matched the lowest low.
This build ships as williams-percent-r-indicator-forexmt4systems.ex4 for MT4 and williams-percent-r-indicator-forexmt4systems.ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Separate window |
| Plots | 1: Williams %R |
| Alerts | popup, push notification, email, sound |
| Inputs | 7 |
What the Williams %R Indicator draws on the chart
Williams %R is the only plot. The pane paints it in sandy brown at the standard width. Values run from zero along the top down to minus one hundred at the floor. A reading near the top puts the close at the upper edge of its range, and a reading near the floor puts it at the lower edge.
This build draws no reference levels of its own. So add horizontal lines at minus twenty and minus eighty in the platform if you want the classic zones marked. The scale itself never changes with the symbol, because the formula divides by each symbol’s own range.
- Williams %R: plot, sandy brown

How the Williams %R Indicator calculates its values
The range window
The loop starts once enough bars exist. For each bar it scans back across Period bars and keeps the highest high and the lowest low it meets. Those two prices bracket the range for that bar. Nothing from the right-hand side of the bar enters the test.
Turning the close into a percentage
One division does the work. The formula subtracts the close from the highest high, divides that gap by the bracket width, then multiplies by minus one hundred. A close level with the top scores zero. Down at the floor the reading hits minus one hundred. A bracket with no width at all returns minus fifty.
How to read the signals
Position comes first, momentum second. A run of readings above minus twenty says buyers keep closing near the highs. A run below minus eighty says the opposite. Those stretches often continue while a trend runs, so treat them as evidence of strength rather than an automatic fade.
The midpoint carries useful information too. A cross back through minus fifty puts the close at the centre of its range, which some traders use as a plain bias switch. A fresh price high paired with a lower reading hints that the push is stalling. Confirm that on the price chart before acting.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
EnableAlerts gates the alert block, while EnablePopup, EnablePushNotify, EnableEmail and EnableSound map to popup, mobile push, email and sound.
Every Williams %R Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
Period |
Period (default 14) sets how many bars the high-low bracket covers. A shorter window whips faster, while a longer one smooths the swings out. | 14 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
The reference screenshot sits on EURUSD H1. A fourteen-bar bracket there covers about half a trading session. Majors, crosses, gold and indices all work, because the reading is relative to each symbol’s own range. Scalpers drop to M5 and accept a far noisier line. Swing traders read it on H4 and daily charts, where the extremes arrive rarely and mean more.
When the Williams %R Indicator fails
The line pins at the edges during trends. Price can hold above minus twenty for days while it climbs steadily. Traders who fade every touch there bleed out. Use the trend on the price chart as your filter first.
A single wide bar resets the bracket. The highest high jumps, so the reading drops hard even though price barely moved. That happens around news and at session opens, and it looks like a signal when it is not.
The build ships one line and nothing else. No signal line, no zones and no divergence logic come with it. Pair the reading with structure, a moving average or your own levels before you act.
The alert section in the source sends no automatic message. Its dispatcher checks each new bar, then exits quietly. Set a platform alert on the line if you need one.
Copy williams-percent-r-indicator-forexmt4systems.ex4 into MQL4/Indicators and williams-percent-r-indicator-forexmt4systems.ex5 into MQL5/Indicators, then restart the terminal and drag the Williams %R Indicator onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Williams %R Indicator for MT4 and MT5
The zip williams-percent-r-indicator-forexmt4systems.zip holds williams-percent-r-indicator-forexmt4systems.ex4, williams-percent-r-indicator-forexmt4systems.ex5 and a short README, compiled files only. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What does a Williams %R reading of minus five actually mean?
It means the latest close sat almost exactly at the highest high of the window. The gap from the top of the bracket down to the close covers roughly five percent of that bracket. Buyers keep closing at the top. In a trend that can persist for days, so read it as strength.
Should I shorten Period on a five-minute chart?
Many scalpers do. On M5 a fourteen-bar bracket covers barely an hour, which some traders find too slow for entries. A shorter window reacts faster and reaches the edges more often. Longer settings filter noise but lag every turn. Test both on your own symbol before you settle.
Why does the Williams %R pane show no zone lines?
The source declares one buffer, one plot and no level directives at all. So nothing draws the classic minus twenty and minus eighty zones for you. Add two horizontal lines in the indicator window properties, or leave the pane clean and read the shape. The calculation stays the same either way.
How does this oscillator behave on EURUSD H1 through the day?
A fourteen-bar bracket on EURUSD H1 covers roughly half a session. The line swings through the full scale several times a day. Extremes cluster around the London and New York opens, where fresh highs and lows arrive. Quiet Asian hours push the reading back toward the middle.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Williams %R Indicator as one input. Always backtest before trading live.
Category: this is part of our Oscillators collection. Browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- For background on this concept, see Acquisition of Credit Suisse by UBS on Wikipedia.
- For broader market context, see Commodity Channel Index CCI at StockCharts ChartSchool.
