Round Number Levels
Round numbers get watched whether or not anyone draws a line on them, so marking them saves the trader from doing it by eye on every chart. The trap most versions of this indicator fall into is a hardcoded step - "every 50 pips" works for a 5-digit FX major and is meaningless on XAUUSD or an index CFD quoted with two decimals and a four-figure price. This indicator picks its step from the symbol itself: digit count first (distinguishing 5/4-digit FX majors from JPY-style 3/2-digit quotes), then, for anything that is neither, the current price's own magnitude, so a $20 instrument and a $2,000 one both end up with a readable grid instead of sharing the same absolute step. A manual override input exists for the symbols the heuristic still gets wrong. Every level line is anchored to the nearest multiple of the step below price, so the ladder always includes a genuinely round number rather than one offset by wherever price happens to sit at the moment it draws. Major lines - every Nth level - carry a price label; minor lines do not, to keep a wide ladder legible. Notes and limitations - This is a static reference grid, not a signal - it never alerts and carries no trade logic. - The ladder is rebuilt from the current Bid each time it redraws, so all levels can shift together the moment price crosses into a different step bucket - this is expected, not a glitch. - With InpRedrawOnNewBar set to false, objects are recreated on every tick, which is heavier than the default and rarely necessary since round levels do not move fast. - Levels priced at or below zero are silently skipped rather than drawn off-scale.
Indicator · MT4 · v1.0 · Free
About Round Number Levels
Round Number Levels is an indicator for MetaTrader 4. It has 11 settings, such as Levels each side, Manual step and Major every. MQL source code included.
Files in the download: RoundNumberLevels.ex4, RoundNumberLevels.mq4, RoundNumberLevels.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Levels each side | 10 | Number of levels to draw, each side of price |
| Manual step | 0.0 | Manual step override (0 = auto from digits/price) |
| Major every | 5 | Major line every Nth level (1 = all major) |
| Minor color | clrSilver | Minor line colour |
| Major color | clrDodgerBlue | Major line colour |
| Minor style | STYLE_DOT | Minor line style |
| Major style | STYLE_SOLID | Major line style |
| Minor width | 1 | Minor line width |
| Major width | 1 | Major line width |
| Show labels | true | Show price label on major lines |
| Redraw on new bar | true | Recompute levels once per new bar (false = every tick) |
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: Gold (XAUUSD) · MT4 Indicator · MQL4 Source Code