ATR Ratio Indicator: Fast ATR Divided By Slow ATR

Written by Dominic Walsh · Published · Last updated

The atr ratio indicator answers a question a single ATR cannot. Is volatility rising or falling? It divides a short ATR by a long one. A reading above 1 means the last few bars covered more ground than the last month of bars did.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from XAUUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Separate window (levels 1)
Plots 1: ATR fast/slow ratio
Alerts popup, push notification, email, sound
Inputs 8

What the ATR Ratio Indicator draws on the chart

ATR fast/slow ratio is a single medium purple line in its own pane.

A reference line marks 1.0, where the two readings match.

Above that line volatility is expanding, below it the market is settling.

Nothing draws until the slower window has filled.

  • ATR fast/slow ratio: line, medium purple, width 2
ATR ratio indicator on XAUUSD H1 showing volatility expansion against the 1.0 line
ATR ratio indicator on XAUUSD H1 showing volatility expansion against the 1.0 line

How the ATR Ratio Indicator calculates its values

Two average ranges

iATR supplies both readings. `AtrFast` `7` covers a short stretch and `AtrSlow` `28` covers four times as much. Both use true range, so gaps count toward each.

One division

RatioBuf takes the fast reading over the slow one. When the slow value is zero the code writes EMPTY_VALUE rather than dividing. That single guard is all the arithmetic protection needed here.

Why a ratio travels

Both readings carry the same price units, so dividing cancels them. The result is a plain number. That is why gold and a currency pair can share the same pane scale.

How to read the signals

The ATR fast/slow ratio at 1.5 means recent ranges are half again as wide as the long average.

Below 1 the market is quieter than it has been.

Sharp spikes usually mark a data release rather than a trend.

Compare the current value against its own recent band, not a fixed target.

Alert channels in this build: popup, push notification, email and sound.

Four channels sit under `EnableAlerts`, which starts on. `EnablePopup` runs alongside it, while `EnablePushNotify`, `EnableEmail` and `EnableSound` begin false. `SoundFile` picks the clip. This build has no once-per-bar guard, so keep the noisier channels off.

Every ATR Ratio Indicator input

Core settings

Setting What it does Default
AtrFast Short average range length, default `7`. 7
AtrSlow Long average range length, default `28`. 28

Alert settings

Setting What it does Default
EnableAlerts Master switch for the ratio alerts, default `true`. on
EnablePopup Terminal dialog on a ratio event, default `true`. on
EnablePushNotify Phone push on a ratio event, default `false`. off
EnableEmail Mail delivery on a ratio event, default `false`. off
EnableSound Sound playback on a ratio event, default `false`. off
SoundFile Wav clip for the ratio alert, default `alert.wav`. alert.wav
ATR ratio indicator inputs: AtrFast and AtrSlow
ATR ratio indicator inputs: AtrFast and AtrSlow

Settings that fit your chart

XAUUSD H1 is the reference chart, and gold shows expansion and contraction clearly. There `AtrSlow` at `28` covers just over a day. On M5 the line reacts within an hour and tracks session rhythm. On daily charts it describes the volatility regime over a month.

When the ATR Ratio Indicator fails

The reading says how much price moves, never which way.

A four-to-one period ratio is arbitrary. Change either input and the whole line shifts.

One gap inflates the fast reading for seven bars, which pushes the ratio up on its own.

Copy the compiled ATR Ratio Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the ATR Ratio Indicator for MT4 and MT5

The zip holds the compiled ATR Ratio Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. 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.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

Why divide AtrFast by AtrSlow?

Because a single ATR tells you the size of recent ranges but not whether that size is unusual. Dividing a 7-bar reading by a 28-bar one turns it into a comparison. Above 1 means the short view is running hotter.

What does the ATR fast/slow ratio at 1.0 mean?

The two averages match, so the last seven bars covered about the same ground per bar as the last twenty-eight. That is the neutral state, which is why the reference line sits there.

Should AtrSlow always be four times AtrFast?

Not necessarily, though the four-to-one gap keeps the two readings clearly different. Narrow it and the ratio hovers near 1 most of the time. Widen it and the line reacts to short bursts more dramatically.

Does this line work the same on XAUUSD and EURUSD?

Yes, and that is the point of a ratio. Both ATR readings carry price units, so dividing cancels them. A value of 1.4 means the same thing on gold as on a currency pair, which raw ATR never manages.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the ATR Ratio Indicator as one input. Always backtest before trading live.

Category: this is part of our Volatility collection. Then, browse more Volatility for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment