Event Countdown Panel
MT4 has no built-in economic calendar a custom indicator can read, so any on-chart calendar tool has to trade automatic sourcing for something that works with any calendar a trader exports - a broker calendar, a spreadsheet, a hand-typed list. This indicator reads a plain CSV file from the terminal's sandbox (MQL4\Files\ (or MQL5\Files\ on the native MQL5 build)) in the same "Date Time,Title,Impact" row format already used by this catalogue's NewsLines indicator, so one exported calendar file works with either tool without any reformatting. Where NewsLines draws vertical lines on the chart at each event's time, this tool answers a different, more immediate question - what is coming up next, and how long is there. It keeps a small always-visible panel showing the next InpMaxEventsShown events in time order, each with its own live countdown that keeps ticking down in real time between bars (driven by a timer, not by new price ticks, so it updates even on a quiet chart), and switches to "HH:MM:SS ago" once an event's time has passed. Rows are coloured by the same free-text impact column NewsLines reads, so high- impact events stand out in the list without needing to be read individually. The file is re-read only when its modification time actually changes, so editing the CSV while the chart is open updates the panel without needing to reload the indicator. Notes and limitations - No built-in calendar source exists in MT4; the CSV must be produced or exported by the trader from wherever they get event times, in the exact "yyyy.mm.dd HH:MM,Title,Impact" column order. - Malformed rows (a date column that will not parse) are skipped individually rather than aborting the whole file load. - Countdown times use the terminal's own clock (TimeCurrent(), the broker/server time), not the trader's local time zone - event times in the CSV must be entered in that same server time for the countdown to be accurate. - The panel always shows the next InpMaxEventsShown events from the first one not yet passed; if every loaded event has already passed, it falls back to showing the most recent ones instead of a blank panel. - Purely a display/alert tool - it does not filter, aggregate, or interpret events beyond the Impact colour column already in the file.
Indicator · MT5 · v1.0 · Free
About Event Countdown Panel
Event Countdown Panel is an indicator for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 12 settings, such as File name, Refresh seconds and Max events shown. MQL source code included.
Files in the download: EventCountdownPanel.ex5, EventCountdownPanel.mq5, EventCountdownPanel.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| File name | EventCountdownPanel.csv | File in MQL5\Files\ (Date Time,Title,Impact) |
| Refresh seconds | 15 | Seconds between file re-read checks |
| Max events shown | 6 | Most upcoming events listed on the panel |
| Alert minutes before | 5 | Alert this many minutes before an event (0 = off) |
| Panel corner | CORNER_LEFT_UPPER | Panel corner |
| Panel x | 10 | Panel horizontal offset in pixels |
| Panel y | 20 | Panel vertical offset in pixels |
| Panel font size | 9 | Panel font size |
| High impact color | clrCrimson | Text colour for Impact=High |
| Medium impact color | clrOrange | Text colour for Impact=Medium |
| Low impact color | clrSilver | Text colour for Impact=Low or blank |
| Past event color | clrGray | Text colour for an event that has just passed |
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 → Indicators.
- 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 indicator from the Navigator onto a chart and adjust the settings.
Tags: Alerts · MT5 Indicator · MQL5 Source Code