ATR Volatility Indicator: ATR As A Percent Of Price

Written by Dominic Walsh · Published · Last updated

The atr volatility indicator solves one problem with plain ATR. Raw ATR is quoted in price units, so 12 on gold and 0.0012 on a currency pair mean nothing to each other. Dividing by the close and multiplying by 100 turns both into a percentage, and percentages compare across instruments.

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
Plots 1: ATR % of price
Alerts popup, push notification, email, sound
Inputs 7

What the Atr Volatility Indicator draws on the chart

ATR % of price is a single dodger blue line in its own pane.

The line reads as a percentage, so 0.15 means the average range is 0.15% of price.

Bars inside the warmup region hold EMPTY_VALUE and draw nothing.

A close of zero also writes EMPTY_VALUE, which guards against a divide by zero.

  • ATR % of price: line, dodger blue, width 2
ATR volatility indicator on XAUUSD H1 showing expansion and contraction as a percentage
ATR volatility indicator on XAUUSD H1 showing expansion and contraction as a percentage

How the Atr Volatility Indicator calculates its values

Taking the average true range

iATR supplies the average true range at `AtrPeriod`, which defaults to `14`. True range covers the gap between bars as well as the bar itself, so an opening jump counts toward the reading rather than being ignored.

Turning it into a percentage

PctBuf takes 100 times ATR divided by the close of the same bar. That single division is the whole idea. It strips out the price level, leaving a number that describes movement relative to what the instrument costs.

Handling the edges

The loop stops short of the last `AtrPeriod` bars plus two, so the pane stays clear until ATR has settled. A close of exactly zero writes EMPTY_VALUE instead of a result. Both guards keep an odd data feed from drawing a spike into the pane.

How to read the signals

Rising values mean ranges are expanding relative to price.

Falling values mean the market is compressing, whatever direction it is drifting.

Compare the current reading with its own recent range rather than with a fixed number.

The same reading on gold and a currency pair means comparable movement.

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

`EnableAlerts` ships on with `EnablePopup` carrying the message, while `EnablePushNotify`, `EnableEmail` and `EnableSound` stay off. `SoundFile` names the clip. This build has no once-per-bar guard, so keep the noisier channels off unless repeats suit you.

Every Atr Volatility Indicator input

Core settings

Setting What it does Default
AtrPeriod Bars in the ATR average, default `14`. Raise it for a slower, steadier line. 14

Alert settings

Setting What it does Default
EnableAlerts Master alert switch, default `true`. on
EnablePopup Terminal popup, default `true`. on
EnablePushNotify Mobile push, default `false`. off
EnableEmail Mail delivery, default `false`. off
EnableSound Sound playback, default `false`. off
SoundFile Clip played when sound is on, default `alert.wav`. alert.wav
ATR volatility indicator inputs: AtrPeriod and the alert switches
ATR volatility indicator inputs: AtrPeriod and the alert switches

Settings that fit your chart

XAUUSD H1 is the reference chart, and it shows expansion and contraction more clearly than most. The percentage form is what makes that comparison possible in the first place. On M5 the line reacts quickly and reads as session rhythm. On daily charts it describes the volatility regime the instrument has been in for weeks.

When the Atr Volatility Indicator fails

The reading says how far price moves, never which way it moves.

Dividing by the close means a large price change alters the percentage even when ranges are steady.

A single gap inflates true range for `AtrPeriod` bars afterwards, so a holiday can distort a whole week.

Copy the compiled Atr Volatility 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 Volatility Indicator for MT4 and MT5

The zip holds the compiled Atr Volatility 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 ATR by the close at all?

Because raw ATR carries the price level with it. Gold near 2400 prints an ATR in whole dollars while a currency pair near 1.09 prints one in ten-thousandths. Dividing by the close removes that difference, so a reading of 0.15 means the same thing on both.

What does AtrPeriod at 14 average?

Fourteen bars of true range, smoothed the way Wilder defined it. True range takes the largest of the bar range, the distance from the previous close to the high, and the distance from that close to the low. Gaps therefore count instead of disappearing.

Is there a level on the ATR % of price line that means high?

No, and adding one would mislead you. Each instrument has its own normal band, and it shifts between sessions. Read the current value against the last few weeks of the same line rather than against any fixed threshold.

Does XAUUSD H1 suit this pane best?

It is the reference chart because gold expands and contracts visibly, which makes the shape easy to learn. The percentage form works identically on any symbol though. Once you know what the line looks like on gold, the same pattern reads the same way on a currency pair.

Are results guaranteed?

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

Category: this is part of our Volatility collection. Also, still, yet, yet, 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