Spread To ATR Ratio
A three pip spread is trivial on a pair with a forty pip ATR and severe on one with an eight pip ATR, but most spread-monitoring tools only ever show the raw pip figure, which forces a trader to remember a different mental threshold per symbol and session. This indicator divides the recorded spread by ATR and plots the result as a percentage, so "spread eats 60% of the available move" reads the same way on every instrument and every timeframe. The line is built from the terminal's own per-bar spread record, not just the current live tick, so the whole visible history shows how spread cost has moved through the session - useful for spotting the widening that happens around rollover or thin overnight liquidity even after those hours have passed. Two level lines mark 25% and 50% as reference bands, and an optional alert fires once when a closed bar's ratio crosses a configurable warning level. Notes and limitations - Relies on the terminal's recorded per-bar spread. Some brokers or some history downloaded without full tick data leave older bars with a spread of zero, which shows as a flat line at the start of the chart; this is a data gap, not a real zero-cost spread. - Bar 0 shows the live spread and updates on every tick until that bar closes; only a closed bar's value can trigger the alert, so a brief intrabar spike never fires one early. - A ratio near or above 100% means the spread is comparable to or larger than the whole recent average range - a strong signal that a market order right now is a poor trade even before considering direction. - This measures cost relative to volatility only. It does not include commission or swap; see Total Cost Gauge (I174) for the full round trip figure.
Indicator · MT4 · v1.0 · Free
About Spread To ATR Ratio
Spread To ATR Ratio is an indicator for MetaTrader 4 based on ATR. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Atr period, Warn percent and Alerts. MQL source code included.
Files in the download: SpreadToAtrRatio.ex4, SpreadToAtrRatio.mq4, SpreadToAtrRatio.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Atr period | 14 | ATR period used as the reference move |
| Warn percent | 50.0 | Alert level: spread cost as % of ATR, 0 disables |
| Alerts | true | Alert once per closed bar when the warn level is crossed |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: ATR · Trading Sessions · Alerts · MT4 Indicator · MQL4 Source Code