Loading…

Williams Percent R With Zones

Williams %R oscillates between 0 and -100, and the common beginner mistake is treating the moment it crosses into the overbought or oversold zone as the signal. In a real trend %R can sit pinned against -100 or 0 for a long stretch of bars while price keeps moving - entering there and getting stopped out repeatedly. The classic rule Larry Williams described is the opposite: wait for the line to leave the zone again, which is what this indicator actually marks. The %R value itself comes straight from the platform's built-in iWPR(), so the line is the unmodified standard calculation; the zone boundaries and the exit test are the only things this file adds. Both zone boundaries are inputs rather than fixed at -20/-80, because different instruments and timeframes sit inside those bands for very different lengths of time - a scalper on a five-minute chart often wants a tighter band than a swing trader on the daily. Notes and limitations - Only zone exits are marked, by design. A bar where %R is deep inside a zone but has not yet turned back produces no arrow - that is the whole point of using the exit rather than the entry. - Williams %R is a pure momentum oscillator with no trend filter of its own; in a strong trend the exit signal against the trend can still be early or simply wrong. Pair it with a trend read before trading against it. - The overbought and oversold boundaries must not overlap or invert - InpOversoldLevel is always the lower, more negative number.

Indicator · MT4 · v1.0 · Free

About Williams Percent R With Zones

Williams Percent R With Zones is an indicator for MetaTrader 4 based on Oscillator. It draws buy and sell arrows on the chart and can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Period, Overbought level and Oversold level. MQL source code included.

Files in the download: WilliamsRZones.ex4, WilliamsRZones.mq4, WilliamsRZones.txt.

Settings

SettingDefaultWhat it does
Period14Williams %R period
Overbought level-20.0Overbought boundary, must be between InpOversoldLevel and 0
Oversold level-80.0Oversold boundary, must be between -100 and InpOverboughtLevel
AlertstrueAlert once per closed bar when %R exits a zone

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Buy/Sell Arrows · Trend · Alerts · Oscillator · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria