Loading…

Most Volatile Symbols By ATR

Comparing raw ATR across a mixed watchlist of forex pairs, metals and indices is the naive approach, and it is wrong on the first symbol that happens to trade at a much higher price than the rest - a 30-point ATR on gold and a 30-point ATR on a JPY pair are not remotely the same amount of tradeable movement, but a raw ranking treats them as identical. This script fixes that by dividing each symbol's ATR by its own current price and expressing the result as a percentage, which puts every instrument on the same scale regardless of what it is quoted in. The ranked table this produces answers the actual question - "which of my watched symbols is moving the most relative to itself right now" - instead of the misleading one raw ATR answers. Symbols without enough loaded history on the chosen timeframe, or without a usable current price, are skipped and counted rather than silently producing a zero that would rank last by accident. Notes and limitations - Ranking is a one-off snapshot. ATR and price both move continuously, so re-run the script when the ranking needs to reflect current conditions. - A symbol newly added to Market Watch may need a chart opened on it, or a short wait, before enough history loads on the chosen timeframe for the ATR to compute; until then it is skipped rather than misreported. - ATR as a percentage of price is a volatility proxy, not a liquidity or spread-cost measure - a symbol can rank high here and still be expensive to trade because of its spread.

Script · MT4 · v1.0 · Free

About Most Volatile Symbols By ATR

Most Volatile Symbols By ATR is a script for MetaTrader 4 based on ATR. It can alert you with a pop-up, sound, email or push message. It has 4 settings, such as Symbol list, Timeframe and Atr period. MQL source code included.

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

Settings

SettingDefaultWhat it does
Symbol listSymbols, comma separated (blank = every Market Watch symbol)
TimeframePERIOD_H1Timeframe the ATR is measured on
Atr period14ATR averaging period
Write csvtrueAlso write the ranked table to a CSV file

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 → Scripts.
  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 script onto a chart to run it once.

Download the PDF guide

Tags: Gold (XAUUSD) · ATR · Alerts · MT4 Script · MQL4 Source Code

MQL4 & MQL5 scripts · PolyMaria