Loading…

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

SettingDefaultWhat it does
SymbolSymbol to study, blank = this chart's symbol
TimeframePERIOD_H1Timeframe to study
Max bars5000Most recent bars to include
Round step pips50.0Spacing between round levels, in pips
Reaction bars5Bars after the touch checked for the outcome
Reaction threshold pips10.0Move needed past/away from the level to call an outcome
Save csvtrueWrite every touch event to a CSV file
DelimiterDelimiterCommaCSV column separator

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 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: Support & Resistance · Alerts · MT5 Script · MQL5 Source Code

MQL4 & MQL5 scripts · PolyMaria