Loading…

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 · MT4 · v1.0 · Free

About Event Countdown Panel

Event Countdown Panel is an indicator for MetaTrader 4. 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.ex4, EventCountdownPanel.mq4, EventCountdownPanel.txt.

Settings

SettingDefaultWhat it does
File nameEventCountdownPanel.csvFile in MQL4\Files\ (Date Time,Title,Impact)
Refresh seconds15Seconds between file re-read checks
Max events shown6Most upcoming events listed on the panel
Alert minutes before5Alert this many minutes before an event (0 = off)
Panel cornerCORNER_LEFT_UPPERPanel corner: 0=LU 1=RU 2=LL 3=RL
Panel x10Panel horizontal offset in pixels
Panel y20Panel vertical offset in pixels
Panel font size9Panel font size
High impact colorclrCrimsonText colour for Impact=High
Medium impact colorclrOrangeText colour for Impact=Medium
Low impact colorclrSilverText colour for Impact=Low or blank
Past event colorclrGrayText colour for an event that has just passed

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Alerts · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria