Check Williams %R against the unsmoothed stochastic

Check Williams %R against the unsmoothed stochastic

Choose a common range

On a closed bar, write down the highest high and lowest low over the last five bars, including the bar you are measuring. Use the same five highs and lows for both calculations. A stochastic set to a close/close range will not describe the same interval. Start with the raw stochastic before any slowing or signal-line average.

Place the close on two scales

With a high of 120, low of 100 and close of 115, the close is three quarters of the way up the range. Raw stochastic is 75. Williams measures from the top and uses a negative scale, so it reads negative 25. Subtracting 100 from raw stochastic reproduces Williams. At the range high the readings are 100 and zero respectively.

%R = raw %K − 100

Eliminate an apparent mismatch

In MT5 choose identical periods, the high/low price field on Stochastic, and slowing of 1. Compare the main stochastic line, not its signal line. Use the same completed candle in the Data Window. If one line looks smoother across a run of bars, inspect the slowing and signal settings before changing the calculation.

Try a range of zero

Give every bar the same high, low and close. The shared fraction now has a zero denominator. Exclude this row from an equivalence test unless both implementations document the same fallback. On a valid range, matching signals from these two aligned settings are the same numerical observation on different scales.

Sources and further reading

Back to top
Indicators3 min

Rebuild a CCI reading from five candles

Why does CCI change when the final price stays the same? Recalculate the mean absolute deviation and compare two five-bar windows.

MQLume Bespoke

Built around your ambition.

Explore bespoke services →

Have something more specific in mind?

Ask us about advanced custom development. Share your requirements through private support or email; we will discuss the scope and quote separately.

100% committed to following up on your delivery and support requests.

Free downloads. Real source files.

FREE

Lizard [MQLume]

MQL5 / MT5Version v2.21

Free editable gold breakout project with six independently selectable cores, session filters and flexible position sizing.

US$149.00FREE
FREE

Scraper Gold [MQLume]

MQL5 / MT5Version v3.80

Free editable source with compiled EX5: four gold breakout engines with independent profiles, sizing, direction and exits.

US$95.00FREE
FREE

EA Black Dragon [MQLume]

MQL5 / MT5Version v13.0

Trend-based entries with optional grid additions, side controls and virtual exits.

US$30.00FREE
FREE

Hamster Scalping [MQLume]

MQL5 / MT5Version v21.0

RSI entries with two ATR filters, configurable sessions and optional grid management.

US$30.00FREE
MQLume

More to explore. A community to share it with.

Stay close to MQLume, wherever you like to learn.

YouTube

See our EAs in action. Explore backtests, walkthroughs and practical guides.

Watch on YouTube

Telegram

Meet other EA users, share ideas and keep up with what’s new.

Join the community Follow official updates

Cart

One personal-use licence per project. Each project can be added once.

Your cart is waiting for its first passenger.

Choose an EA or source edition to get started.

Continue shopping