EconomicCalendar for MT5: User Guide

8 October 2026, 10:38
Pham
0
8

EconomicCalendar for MT5: user guide

This guide explains how to install Economic Calendar, what the panel shows, and what every input does. The product page has the short description; here you find the details.

Contents

  1. Installation and first start
  2. The panel
  3. Data sources and updates
  4. Inputs, group by group
  5. The Settings panel
  6. Vertical lines with titles
  7. Alerts and Telegram
  8. Special news and custom news
  9. Calendar panels on other charts
  10. Signals for other Expert Advisors
  11. News Guard (orders)
  12. EA control around news
  13. Strategy Tester, files and troubleshooting
  14. Risk notice

1. Installation and first start

  1. Open Tools > Options > Expert Advisors, tick Allow WebRequest for listed URL and:

    add https://nfs.faireconomy.media This is the Forex Factory calendar. 

add https://sslecal2.forexprostools.com This is the Investing.com calendar. 


For Telegram alerts also add https://api.telegram.org . If you only use the MetaTrader 5 calendar source, no URL is needed.

  1. Drag Economic Calendar from the Navigator onto a chart. In the Common tab tick Allow Algo Trading if you want to use News Guard or EA control (the calendar alone does not need it).
  2. Choose the source in Calendar source, the currencies you trade in the Currencies group, and press OK.

If a URL is not allowed yet, the status line of the panel says so and the EA checks again every minute, so it starts to work within a minute of adding the URL. You do not need to attach the EA again.

[screenshot: the panel on a chart]

2. The panel

From top to bottom:

  • Title row: the panel title, the Settings button and today's date.
  • Source buttons (optional): FF and MT5. They switch the source at once. The choice is kept while the terminal is open, also across timeframe changes; changing the inputs resets it to Calendar source.
  • Event table, earliest first, up to Events shown rows:
    • Time: day and time in the chosen time zone (local PC, broker server or GMT). Events without an exact time show All Day or Tentative.
    • Left: time left until the release, or time since the release (5m ago).
    • Cur: currency.
    • Event: the title, shortened to Max characters of event title.
    • Act: actual value, green when better and red when worse than expected. Only the MetaTrader 5 source publishes actual values; the Forex Factory weekly feed has none, so the column is hidden for it.
    • Fcst: forecast, green when higher and red when lower than the previous value.
    • Prev: previous value.
    Rows use the impact color (high, medium, low, holiday). A released event turns gray and stays listed for Hide event after release minutes (default 10), so an event released 9 minutes ago is still shown. All-day events stay until the end of their day. Hover a row to see the full title, the country, local and server time, the values and the source.
  • Status line with the Refresh button: the source, the time since the last update, the time to the next download, and warnings (not updated today, stale, download failed, allow WebRequest for ..., waiting for data from the broker server). Refresh downloads the selected source now (at most once a minute); for the MT5 source it reloads the terminal's calendar.

Next to the panel (optional) a small line shows the symbol info: the change of the day, the spread and the time left in the current bar.

3. Data sources and updates

Forex Factory. The weekly calendar (Sunday to Saturday, New York week) downloaded with WebRequest. Times are converted to GMT. Holidays are shown as all-day items. There are no actual values.

MetaTrader 5 calendar. The calendar of your broker, read with the terminal's own calendar functions: no WebRequest, no file. Times are converted from server time to GMT. The window is from yesterday to 7 days ahead; it is reloaded when the calendar reports a change (checked every 10 seconds), every 15 minutes otherwise, and every 30 seconds while it is still empty. It can be empty for a while after the terminal starts, and some brokers do not provide it: the status line then says waiting for data from the broker server.

Download schedule (Forex Factory). Update frequency chooses:

  • Once a day (default): at the start of the broker's server day plus Once a day: download at minutes, or right away when the data of the current server day is missing (first start, EA not running at midnight, no cache file).
  • Interval: when the data is older than Interval: update every minutes (minimum 30), and hourly once the week is over.

After a failure the EA waits Retry after a failure minutes (default 15), doubling up to 2 hours (at least 1 hour after an HTTP 429 answer). There is never more than one request per 5 minutes, also across restarts. The calendar is cached in the Common\Files folder and shared by all charts: only one chart downloads, the others reload the file. A new file replaces the old one only when it really is a calendar, so a failed download never destroys the last good data.

4. Inputs, group by group

All inputs can also be changed at run time in the Settings panel (section 5), except the Object prefix.

Data source

Input Default Meaning
Calendar source Forex Factory Forex Factory or the MetaTrader 5 built-in calendar. The panel buttons override it at run time.

Event filters

Input Default Meaning
Include high / medium / low impact on / on / off The impact levels that are shown.
Include holidays / other on Holidays and events without an importance.
Include speeches on Speeches, found from the title ("Speaks", "Speech", "Testimony", "Press Conference").
Include special news on Core CPI, Federal Funds Rate, Non-Farm Employment Change and Main Refinancing Rate (and the same releases under the names the MT5 calendar uses) are shown whatever their impact. See section 8.
Include custom news off News whose title contains one of your own phrases are shown whatever their impact.
Custom news phrases empty Phrases separated by ; , any match in the title. Example: ISM; Retail Sales
Find keywords empty Only show events whose title contains one of these (separated by ; ).
Ignore keywords empty Hide events whose title contains one of these.
Keywords are case sensitive off Applies to find, ignore and custom keywords.

Currencies

USD, EUR, GBP, JPY, AUD, NZD, CAD, CHF are on; CNY and "All" (OPEC, G20 and similar) are off. Only the events of the enabled currencies are shown, alerted and counted in the signals, whatever the chart symbol.

Panel

Input Default Meaning
Show panel on When off, only a small Settings button stays in the corner.
Show panel in the first sub window (if any) off Uses sub window 1 when the chart has one.
Panel corner Left lower Any of the four corners.
Horizontal / vertical margin 10 / 10 px Distance from the chart border.
Events shown 5 1 to 20 rows.
Hide event after release 10 min How long a released event stays listed.
Time zone of the panel Local PC time Local PC time, broker server time or GMT.
Panel title Economic Calendar Any text.
Font, Font size Arial, 9 Font of the panel texts.
Max characters of event title 42 Longer titles are cut.
Show panel background on
Show status line on Source, data age, errors.
Show "Refresh" button on Next to the status line.
Warn when data is older than 26 h The status line shows (stale) after this age. The default is above one day so that "once a day" mode does not warn every evening.
Show source buttons on The FF / MT5 buttons.
Show a compact panel on all other charts off See section 9.

Colors

Title, panel background and border; high, medium, low and holiday impact; remarks and past events; actual (neutral, better, worse); previous; forecast (higher, lower, equal); warnings; source buttons (normal and selected, background and text). All of them can be typed in the Settings panel as #RRGGBB or R,G,B .

Vertical lines

Input Default Meaning
Show vertical lines for listed events on A dotted line at the time of each listed timed event. Events of the same minute share one line.
Show the event title next to the line on See section 6.
Font size of the line titles 8
Extra shift (minutes) 0 The broker's server offset is applied automatically; this moves the lines further.

Symbol info

Show the daily change, spread and bar time left (on); its corner (right upper), color and font size (8).

Alerts

Input Default Meaning
First alert / Second alert (minutes before) 30 / -1 -1 disables an alert, 0 alerts at the release.
Popup / Sound / Email / Push off / on / off / off Sound file alert.wav . E-mail and push use the terminal's settings.
Telegram, bot token, chat id off, empty, empty See section 7.
Alert once per terminal on When off, every chart alerts on its own.

Each event alerts at most once per alert number. When popup alerts are off, the alert text is written to the Experts log instead.

Signals for other EAs

Publish next/last event as global variables (on). See section 10.

Data download (Forex Factory)

Input Default Meaning
Update frequency Once a day Once a day or Interval (section 3).
Once a day: download at 0 Minutes after server midnight, 0 to 720.
Interval: update every 240 min Minimum 30.
Retry after a failure 15 min First retry wait; doubles up to 2 hours (minimum 5).
HTTP timeout 30 s Per request.

News Guard and EA control

Described in sections 11 and 12.

Advanced

Object prefix (ECAL): change it only to run a second copy of the EA on the same chart.

5. The Settings panel

The Settings button in the title row (or alone in the corner when the panel is hidden) opens a panel in the top middle of the chart. It changes the inputs at run time, in tabs: Filters, Currencies, Panel, Display, Text, Colors 1, Colors 2, Alerts, Download, Orders, EA control.

  • A switch or a list changes with a click. A number or a text is typed in its field and applied with Enter; numbers keep the ranges of the inputs. Colors are typed as #RRGGBB or R,G,B and shown with a swatch.
  • Changes apply at once. Changing a filter re-filters the data you already have, it never starts a download.
  • Reset tab puts the open tab back to the input values; Reset all does it for every tab. Close closes the panel.
  • Save .set writes every input with its current value to MQL5\Files\Presets\EconomicCalendar_<date>_<time>.set (UTF-16 with a BOM, like the files MetaTrader writes). To see it in the Load button of the inputs dialog, copy it to MQL5\Presets . The file contains your Telegram token if you entered one: do not share it.
  • The settings are saved for the chart's symbol in MQL5\Files\EconomicCalendar_settings_<prefix><symbol>.ini , so they survive timeframe changes and terminal restarts. They are used only while the inputs are unchanged: if you change an input in the properties dialog, the inputs win and the saved file is dropped. Removing the EA deletes the file.
  • Every change is logged in the Experts tab as setting changed - [Tab] Name: old -> new . The Telegram token is never written to the log.

[screenshot: the Settings panel]

6. Vertical lines with titles

Each listed timed event gets a dotted vertical line at its time (server time is applied automatically). With Show the event title next to the line the title (for example USD Core CPI m/m ) is written upwards along the right side of the line, in the color of the line, starting 24 pixels above the bottom of the chart. Events of the same minute share one line and one label ( USD A | USD B ). Past events are drawn in the remarks color. Set the size with Font size of the line titles.

7. Alerts and Telegram

The first and second alert come the number of minutes you set before each timed news (holidays and events without an exact time never alert). The text looks like:

First alert: USD (High) in 30m - Core CPI m/m at Wed 15:30 Local | F: 0.3% | P: 0.2%

Telegram.

  1. In Telegram talk to @BotFather, send /newbot and copy the bot token. Write any message to your bot (or add it to a group or channel).
  2. Find your chat id (for a private chat, for example with the @userinfobot bot). Groups have negative ids; a public channel can be written @channelname .
  3. Add https://api.telegram.org in Allow WebRequest for listed URL.
  4. Switch Telegram on and enter the token and the chat id (inputs or the Alerts tab of the Settings panel). When you turn it on or change the token in the panel, a test message is sent and the status line says whether it worked.

Every alert, the News Guard messages and the new-order alerts also go to Telegram. Messages are queued and sent one per second, so a slow connection never delays the rest; the notice that comes before News Guard closes positions is sent at once. After a failure nothing is sent for 60 seconds and the message is tried again (3 attempts). Every attempt is written to the Experts log (Telegram message sent, or the reason it failed). The token is stored in clear text in the inputs and in the saved settings: do not share them.

8. Special news and custom news

Two switches in Event filters let chosen news through whatever their impact level.

  • Include special news: titles that contain Core CPI, Federal Funds Rate, Non-Farm Employment Change or Main Refinancing Rate. The same releases are also found under the names the MetaTrader 5 calendar uses: Nonfarm Payrolls, Non-Farm Payrolls, Fed Interest Rate Decision, ECB Interest Rate Decision.
  • Include custom news: titles that contain one of the phrases of Custom news phrases.

These news skip the impact, holiday and speech filters. The currency filter, Find keywords and Ignore keywords still apply. Matching is a plain "title contains the phrase" test; it works on the titles the source really uses.

9. Calendar panels on other charts

With Show a compact panel on all other charts (off by default) the EA draws a compact copy of the table on every other open chart that does not run this EA. It refreshes every 5 seconds and charts opened later get a panel within a few seconds. Each panel has an X button that removes it from that chart; it is not drawn there again until the EA is restarted. The panels are removed when the option is turned off or the EA is removed.

10. Signals for other Expert Advisors

When Publish next/last event as global variables is on, the EA updates these terminal global variables every second. They are named after the chart's symbol and follow this chart's filters and source. Holidays and events without an exact time are not counted. -1 means "none".

Global variable Meaning
ECAL.<symbol>.NextMin Minutes until the next event (0 = within the current minute)
ECAL.<symbol>.NextImpact Impact of that event (1 low, 2 medium, 3 high)
ECAL.<symbol>.LastMin Minutes since the last event that already happened
ECAL.<symbol>.LastImpact Impact of that event
ECAL.<symbol>.Updated TimeGMT() of the last update. Check it to know the values are fresh

double next = GlobalVariableGet("ECAL." + _Symbol + ".NextMin"); double imp = GlobalVariableGet("ECAL." + _Symbol + ".NextImpact"); if(next >= 0 && next <= 30 && imp >= 3) { // high-impact news within 30 minutes, e.g. skip opening new trades }

To get the signals for one currency pair only, enable only its currencies on that chart. Only one copy per symbol should publish: switch the option off on extra copies.

11. News Guard (orders)

The only part of the product that sends trade requests. All three switches are off by default. It works on the news that pass the panel filters (impact, currencies, special and custom news, keywords); holidays and events without an exact time are ignored. Several news at the same time count as one.

Function What it does
Close all orders before news (default 30 min) When a news is that many minutes away, first sends an alert (also to Telegram), then closes all selected open positions and deletes the selected pending orders.
Close orders with net profit > 0 before news (default 45 min) When a news is that many minutes away, closes the selected positions whose net profit (profit + swap + commission and fees paid so far) is above zero. Losing positions and pending orders are left alone.
Alert when a new order is opened near news (window 30 min before to 30 min after) Alerts when a position is opened or a pending order is placed inside the window. Closing a trade does not alert.
  • Which orders: Magic numbers (separated by ; ; empty or * = all; 0 = manual trades) and Symbols (separated by ; ; empty or * = all; chart = the chart's symbol). Both must match. A magic list with no valid number (a typo) matches nothing; it never falls back to "all".
  • Once per news. Closing runs once for each news time: it starts when the window opens (also when the EA starts inside the window) and is retried every 10 seconds if a close fails, up to 12 rounds. Orders you open later in the window are not closed again; the alert covers them.
  • Alerts use the channels of the Alerts group. While a window is active, a line News guard: <news> in 12m is shown at the top of the chart.
  • Requirements: Algo Trading on in the terminal (toolbar), allowed for the EA (Common tab) and enabled for the account. Otherwise the EA says so (Algo Trading is off in the terminal (toolbar button) and similar) and keeps trying until the news.
  • It never opens or modifies orders, and it does nothing in the Strategy Tester.

Test on a demo account first. Closing positions cannot be undone.

12. EA control around news

An optional module (off by default) that removes the Expert Advisors from the other charts a number of minutes before a news and installs them again a number of minutes after it, each with the inputs it had.

Input Default Meaning
Remove the EAs of the other charts before news, reinstall them after off Master switch.
Remove the EAs this many minutes before news 30 Start of the window.
Reinstall them this many minutes after news 30 End of the window.
EAs to remove All matching EAs All the EAs that pass the two filters, or only the chosen EAs (see below).
Charts: symbols * Separated by ; . * and ? are wildcards; a name starting with ! excludes ( *;!XAU* ).
EAs: names * Same syntax ( *;!MyHedgeEA keeps MyHedgeEA).

Choosing the EAs. In the Settings panel, tab EA control, set EAs to remove to Only the chosen EAs and press Choose the EAs. A list opens with every EA that runs on the other charts: the EA name first, then the chart ( EA name | SYMBOL TF ), 10 per page. Click a line to tick or untick it, then press Done. Select all and Clear change every line, Refresh reads the charts again and keeps your ticks, Cancel keeps the old choice. The list is read from the charts every time you open it. An EA is identified by its symbol, its timeframe and its name; if you change the timeframe of a chart, tick its EA again.

How it works.

  • The module uses the news that pass the panel filters, like News Guard. News that are close together make one window: the EAs come back after the last of them.
  • It never touches the chart it runs on or other copies of this EA.
  • The inputs are saved first. Before a chart is touched, the EA block of its chart template (the EA path and all its inputs and permission flags) is written to MQL5\Files\EconomicCalendar_removed_<chart id>.tpl and the list of removed EAs to EconomicCalendar_removed.ini . Reinstalling puts exactly that block back into the chart's current template, so indicators and objects you changed meanwhile are kept.
  • If this EA is restarted or the terminal is restarted while EAs are removed, the list is read again and the EAs are reinstalled when the window is over (at the latest 6 hours after the planned time). Switching the module off reinstalls them at once.
  • One chart is handled per second. A chart is retried every 10 seconds, 3 times; if it still fails (for example the chart was closed) the log says so and the inputs file is kept so you can attach the EA by hand. A chart that got another EA in the meantime is not changed.
  • A message (also to Telegram) is sent when the EAs are removed and when they are reinstalled.

Requirements and cautions. Algo Trading must be allowed for this EA (toolbar button and Common tab): an EA started through a template can trade only if the EA that applied the template may trade. Without it, nothing is removed and the EA says so. Removing an EA stops it; it does not close its positions or pending orders (use News Guard for that). Removal goes through the chart template, which also re-creates the indicators and objects of that chart. If you remove this EA or close its chart while other EAs are waiting, they are not reinstalled until you attach this EA again. Test on a demo account first.

13. Strategy Tester, files and troubleshooting

Strategy Tester. Neither WebRequest nor the calendar functions work there. The EA loads nothing and the panel says that calendar data is not available in the tester. News Guard and EA control do nothing in the tester.

Files created.

  • Common\Files\EconomicCalendar_ff_thisweek.json : the Forex Factory cache, shared by all charts and terminals.
  • MQL5\Files\EconomicCalendar_settings_<prefix><symbol>.ini : the settings saved from the Settings panel.
  • MQL5\Files\Presets\*.set : files saved with Save .set.
  • MQL5\Files\EconomicCalendar_removed*. : EA control (only while EAs are removed).
Message Meaning What to do
allow WebRequest for ... / error 4014 The URL is not in the allowed list. Add it (section 1); it works within a minute.
no connection, 1001 / no response, 1003 MetaTrader could not connect or the request timed out. Usually temporary: check the internet connection; the EA retries.
not updated today Once a day mode: the download of the current server day has not succeeded yet. See the error after it; the EA keeps retrying; or press Refresh.
(stale) The data is older than the warning age. Press Refresh and read the Experts log.
try again in N s Refresh was pressed less than a minute after the last request. Wait the given seconds.
waiting for data from the broker server The MT5 calendar is still empty. Wait for the terminal to sync, or your broker does not provide it; use Forex Factory.
A released event is still listed (9m ago) Hide event after release is 10 minutes by default. Lower that input or the setting in the panel.
News guard: could not close ... A close failed (Algo Trading off, market closed, requote...). Read the reason and the return code in the Experts log. The EA retries every 10 seconds, up to 12 rounds.
Algo Trading is off in the terminal (toolbar button) The toolbar button is off. Switch it on; News Guard and EA control retry.
Telegram - WebRequest is not allowed https://api.telegram.org is not in the allowed list. Add it, then switch Telegram off and on in the Settings panel to send a test.
Telegram refused the message ... HTTP 401 / 400 Wrong bot token / wrong chat id, or you never wrote to the bot. Check both values; send the bot a message first.
EA control - ... NOT reinstalled A removed EA could not be put back (chart closed, another EA there, file missing). Attach the EA by hand; its inputs are in the saved .tpl file.

14. Risk notice

Economic Calendar is an information and risk-management tool. The data comes from third parties and from your broker; it can be delayed, incomplete or later revised. News can move the market in ways nobody can predict. News Guard closes real positions and EA control stops other Expert Advisors: check every setting, test on a demo account, and use them at your own risk. Trading involves a risk of loss; nothing in this product is a promise of profit.

EconomicCalendar for MT5: link to the Market listing

Files: