Range Oscillator sits in its own window on MT4 and MT5 and answers one question: how far is price from the middle of its range, measured in units of that range's own width.

Zero means the middle. Plus 100 means price is exactly one range-width above it. The colours tell you whether that's a normal excursion or a break.

The oscillator under EURUSD H4, coloured by state

The centre line is not an average

This is the part that makes the tool different, and it's one line of arithmetic.

Instead of averaging the last 50 closes equally, each close is weighted by how far price moved on that bar, as a fraction of the previous close. A bar that moved 0.4% carries four times the weight of one that moved 0.1%. A bar that barely moved contributes almost nothing.

The result is a centre that sits where the market actually transacted with conviction. A long quiet Asian session doesn't drag it around; the hour the market repriced does.

An equally weighted average of the same 50 closes puts the centre in a different place, and on a chart with a lot of dead time the difference is large.

The scale is the range, not the price

The oscillator is 100 ร— (close โˆ’ centre) / (ATR ร— multiplier), with a 200-period ATR and a multiplier of 2.

Because the denominator is the range width, the reading is comparable across instruments and timeframes. A reading of 50 on gold and 50 on EURUSD mean the same thing: price is halfway from the centre to the edge of what this instrument considers its normal range.

That's also why there are no fixed overbought and oversold lines. There's no need for them; ยฑ100 is the edge, by construction.

The colours

Five states, and they're doing real work:

Colour Meaning
Strong bullish Close is more than one full range-width above the centre. A break upward
Strong bearish Close is more than one range-width below. A break downward
Weak bullish Above the centre, still inside the range
Weak bearish Below the centre, still inside
Neutral The bar where direction flipped

So the line changing to a strong colour is the event. Everything else is price moving around inside a range that the tool has decided is still a range.

There's a separate in-range test behind the scenes: the furthest of the last 50 closes has to be within the range width of the centre. When it isn't, the market has stopped being a range and the reading should be read as trend position rather than range position.

Alerts

Two switches. When trend change fires when the oscillator crosses the centre; When strong trend only restricts alerts to the moments a strong colour appears.

The second one is on and the first is off, which is the right way round. Crossing zero happens constantly; leaving the range does not. One alert per bar at most.

What it publishes

A colour line plot with its colour index, so iCustom gets you both the value and which of the five states the bar was in. That's enough to build a filter in an EA: take the reading for position and the colour for regime.

Where it's weak

A 200-period ATR is slow on purpose and slow in practice. The range width barely moves day to day, which is what makes readings comparable over time, and it also means a genuine change of volatility takes a long while to show up in the scale.

The centre uses closes only. Wicks contribute nothing beyond their effect on the close, so a violent rejection bar with a small body is weighted as a quiet bar.

Fifty bars is the whole memory. Both the centre and the in-range test look at the last 50 closes. A range that has lasted 300 bars and one that started 50 bars ago are treated identically.

The heatmap levels setting does very little. Heatmap Levels exists and the effect on the plotted colours is marginal in this build. The five states above are what you'll actually see.

Nothing is drawn on the forming bar. The loop stops one bar short of the live candle, so the newest reading appears at bar close.

Questions you'll have

Does Range Oscillator repaint? No. The calculation runs on closed bars and stops one short of the live candle. A plotted value stays where it was plotted.

What do the numbers mean? Percent of one range-width away from the centre. Zero is the centre, ยฑ100 is one full range width, which is where the colour turns strong.

Why aren't there overbought and oversold lines? Because the scale is already normalised to the range. ยฑ100 is the edge by construction, and the colour change marks it.

How is the centre different from a moving average? Each close is weighted by how much price moved on that bar. Quiet bars barely count. An equally weighted average of the same closes lands somewhere else.

What's the difference between weak and strong colours? Strong means price closed more than one range-width from the centre, which is a break out of the range. Weak means it's still inside.

Can an EA read it? Yes. It's a colour line plot, so iCustom gives you the value and the colour index, which is the state.

Best settings for intraday? Lower ATR Period from 200 if you want the scale to react within a session. Leave Minimum Range Length at 50 unless you're specifically looking for shorter ranges.

MT4? Both platforms are included, one download each. Same weighting, same scale, same five colours.

Support

Message me through the site with a screenshot, the symbol and the timeframe, and I can tell you why a bar took the colour it did. Updates are included for as long as your subscription runs.

Analysis tool. It places no trades and makes no profitability claim. Past price behaviour is not a guide to future price behaviour.