News Minute Aftermath Study
MQL4 has no calendar feed of its own, so several tools in this catalogue share one documented calendar file format - a plain CSV a trader (or an export tool) maintains in the MQL4\Files\ (or MQL5\Files\ on the native MQL5 build) sandbox. This script is the aftermath measurement tool: for every loaded event that matches the chart symbol's two currencies and meets the minimum impact filter, it walks the M1 series minute by minute from the release forward and reports three numbers - the total high-low range across the whole measurement window, the size of the initial spike (the largest excursion from the pre-release price within a shorter spike search window), and what percentage of that spike had given itself back by the end of the measurement window. A spike that fully retraces and one that holds are very different trading environments, and a single "range after news" number collapses that distinction. Reporting the retrace percentage separately lets a trader see, event by event, whether a given release's typical pattern is a hold-the-move release or a fade-it-back release. This is genuinely M1-history-hungry: measuring a release from years ago needs the terminal to already hold M1 bars that far back, which most brokers do not retain by default. Events whose measurement window cannot be fully covered by locally available M1 history are reported as skipped in the summary line, not silently dropped from the event count. Notes and limitations - Only events whose currency matches one of the chart symbol's two three-letter currencies are measured; symbols that do not fit the plain 6-letter shape are refused with a clear message. - Events with insufficient local M1 history to cover the full measurement window are skipped and counted separately in the summary line, not silently excluded. - The pre-release reference price is the open of the M1 bar nearest the event time; on a broker whose M1 series has a gap exactly at the release, this can be a minute or more away from the true release moment. - Malformed calendar lines are skipped and counted rather than aborting the whole load. - This is a one-shot historical measurement tool, not a live monitor.
Script · MT5 · v1.0 · Free
About News Minute Aftermath Study
News Minute Aftermath Study is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 7 settings, such as Symbol, Calendar file name and Min impact. MQL source code included.
Files in the download: NewsMinuteAftermath.ex5, NewsMinuteAftermath.mq5, NewsMinuteAftermath.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol to measure ("" = this chart's symbol) | |
| Calendar file name | NewsMinuteAftermath_Calendar.csv | Calendar file, MQL5\Files\ sandbox (see header for format) |
| Min impact | 2 | Only events at or above this impact (1-3) are measured |
| Server to gmt offset hours | 0 | Broker/server time minus GMT, hours (0 if server already reports GMT) |
| Measure minutes | 30 | Minutes after the release to include in the range/retrace window |
| Spike window minutes | 5 | Minutes after the release searched for the initial spike extreme (must be <= InpMeasureMinutes) |
| Save csv | true | Write the per-event results to a CSV file |
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: News Trading · Alerts · MT5 Script · MQL5 Source Code