Round Number Reaction Study
Round numbers - the .00 and .50 levels, or whatever spacing a trader is watching - get treated as meaningful support and resistance almost by habit, rarely by measurement. This script measures it: it scans the loaded history for round levels spaced at a chosen pip interval, finds the FIRST bar each level enters a bar's high/low range, and checks a fixed number of bars later whether the close reversed away from the level, broke through it, or did neither. Only the first touch of a level counts. A market grinding sideways across a level for ten bars would otherwise register ten touches of what is really one event, and inflate the sample with repeats of the same episode rather than adding new evidence. A level only counts again once it has left the recent range and come back. Results are split by the direction price approached the level from, because a level being tested from below and the same level being tested from above are not guaranteed to behave the same way, and a single combined reversal rate can hide that asymmetry. Notes and limitations - A bar that opens exactly on a round level has no defined approach direction and is skipped rather than guessed at; this only matters on instruments with very coarse price steps. - The outcome is judged from the close of the bar InpReactionBars later, not from the extreme reached in between - a level that was briefly broken and then closed back past it on the near side is scored a reversal. - This is a descriptive study, not a trading signal. It does not account for spread or slippage, and a reversal rate close to fifty percent on a small sample is not evidence the level matters. - A single wide bar can contain more than one round level; each is tested as its own event, which is correct but means the touch count is not the same as the bar count.
Script · MT5 · v1.0 · Free
About Round Number Reaction Study
Round Number Reaction Study is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 8 settings, such as Symbol, Timeframe and Max bars. MQL source code included.
Files in the download: RoundNumberReactionStudy.ex5, RoundNumberReactionStudy.mq5, RoundNumberReactionStudy.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol to study, blank = this chart's symbol | |
| Timeframe | PERIOD_H1 | Timeframe to study |
| Max bars | 5000 | Most recent bars to include |
| Round step pips | 50.0 | Spacing between round levels, in pips |
| Reaction bars | 5 | Bars after the touch checked for the outcome |
| Reaction threshold pips | 10.0 | Move needed past/away from the level to call an outcome |
| Save csv | true | Write every touch event to a CSV file |
| Delimiter | DelimiterComma | CSV column separator |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Support & Resistance · Alerts · MT5 Script · MQL5 Source Code