ForexCopilotEA

Risk management

The MT5 Economic Calendar and EA News Filters: How They Work, How to Set Them and Where They Fall Short

By Benjamin Lee · Updated · 6 min read

Most traders know that news can wreck an Expert Advisor. Fewer know how a news filter really works: where it gets its events, what impact levels mean, why some filters need a web address added in the terminal, and why a filter that works live may do nothing in a backtest. This guide explains the MT5 economic calendar, the common kinds of EA news filter, how to set the pause window sensibly, and how to check that the filter is doing its job before a major release.

Key takeaways

  • MT5 has a built-in economic calendar. Some EAs read it, others use their own web source.
  • A news filter only protects you if it covers the events that matter for your symbol.
  • Filters that fetch data from the web need that address added under Tools, Options.
  • Calendar-based filters may not work in the Strategy Tester, so backtests can overstate results.
  • Check your filter every week against the calendar. Do not assume it is working.

The built-in MT5 economic calendar

MetaTrader 5 includes an economic calendar. In the Toolbox window at the bottom of the terminal, the Calendar tab lists upcoming releases with the country, the event, the time, the importance and the previous, forecast and actual values. You can filter by importance, currency and country. Events are labelled low, medium or high importance, which gives you a quick way to find the releases that move markets. The time is shown in the time zone you set for the calendar, so confirm it matches your own.

MQL5 also provides calendar functions, so an EA can read the same data from inside the terminal. That is one way a news filter works. MetaQuotes documents these in its reference, and the behaviour in the tester is limited, as the section below explains.

The kinds of news filter in an EA

How EA news filters get their data
TypeWhere it gets eventsNeeds setupWeak point
Built-in terminal calendarThe MT5 calendar through MQL5 functionsTerminal must be connected; calendar data must be loadedMay not run in the tester; relies on the platform's data
Web sourceA web address the EA requests (WebRequest)The address must be added under Tools, Options, Expert AdvisorsFails silently if the address is missing or the site is down
Manual time windowsTimes you type into the inputsYou must keep the list up to dateEasy to forget; no automatic updates
Hard-coded listA list inside the EANone, but goes staleOut of date unless the vendor updates it

If your EA uses a web source, the manual will list the addresses to allow. Add only those. An EA that asks you to whitelist unfamiliar addresses deserves a closer look, as covered in our guide to free EAs and safety. A filter that cannot reach its source usually does nothing, so test it, rather than assuming.

Impact levels and what to filter

Choosing impact levels for an EA filter
Impact levelExamplesCommon approach
HighUS jobs and inflation, Federal Reserve and ECB rate decisions, central bank press conferencesPause for a longer window
MediumRetail sales, PMI surveys, producer prices, some speechesPause for a shorter window, or only for the currency of your symbol
LowMinor releases and regional dataUsually ignored, or only for sensitive strategies

Match the filter to the instrument. A gold EA should respond to US releases and major central banks. A EURUSD EA should respond to both euro-area and US events. A scalper needs a stricter filter than a swing strategy. Our guide to gold and news covers the biggest events in detail.

Setting the pause window

Most filters have two numbers: minutes to stop before an event, and minutes to wait after it. Longer windows protect more and skip more trading. For the biggest events many traders use a longer window than for medium ones, and some close open trades before the event. The right values depend on how your EA reacts. Start with the author's defaults and check them against the fills and the spread around real events in your own account.

  • Test what the filter does to open positions. Some only stop new entries, others also close or protect trades.
  • Check the filter covers both sides: it should wait after the event as well as before.
  • Look at the spread after a release and wait until it returns to normal before resuming.
  • If the EA offers a currency filter, set it to the currencies in your symbol.
  • Keep a separate manual pause for events the calendar does not list, such as unscheduled speeches.

Why backtests may ignore the filter

The Strategy Tester replays price history. It does not replay the economic calendar in the same way a live terminal has it, and WebRequest calls do not work in the tester. As a result, an EA with a calendar-based or web-based news filter can run in the tester with the filter off, trading straight through every release. The backtest then shows a result for an EA you would not actually run. Some vendors work around this by building a time list into the EA for testing.

If news protection matters to your strategy, test with a time-based pause that matches real events in the test period, and compare it with a run without any filter. If the results differ a lot, the live account will depend on the filter working. Our backtest versus live guide explains how to compare.

A weekly news routine

  1. Step 1: Open the calendar on Sunday

    Filter for high and medium importance and for the currencies in your symbols. Note each event with its local time.

  2. Step 2: Confirm the time zone

    Check that the calendar shows your time zone, and convert to broker server time for the EA's inputs.

  3. Step 3: Compare with the EA's filter

    Check the EA's panel or journal. It should show the next event and the pause window. If it shows nothing, the filter may be off.

  4. Step 4: Add manual pauses

    For events the filter may miss, set a manual stop of the EA, or use the time inputs.

  5. Step 5: Review after the biggest event

    Look at the fills, slippage and the EA's behaviour. Adjust the window if needed.

News filter check
0/7

Sources and further reading

  1. MetaTrader 5 Help: Expert Advisors and Custom IndicatorsHow Expert Advisors and custom indicators work in the terminal.
  2. MQL5 ReferenceThe language documentation for writing Expert Advisors, indicators and scripts.
  3. MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.

Frequently asked questions

Where is the economic calendar in MT5?

In the Toolbox window at the bottom of the terminal, on the Calendar tab. It lists upcoming events with importance, country, time and values, and can be filtered by importance and currency.

Why does my EA need a WebRequest address?

Some EAs get news data from a website. MT5 blocks web requests unless the address is listed under Tools, Options, Expert Advisors. Add only the addresses the manual names.

Does the news filter work in the Strategy Tester?

Often not. Calendar functions and WebRequest generally do not work in the tester, so the EA may trade through news in a backtest even though the live filter would pause it.

How long should the news pause be?

There is no single value. Cover the release and the first reaction, use longer windows for the biggest events, and check against your own fills.

Do I need a news filter on every EA?

Scalpers, gold EAs and tight-stop strategies benefit most. Slower strategies with wide stops may be less sensitive, but major events can still cause gaps and slippage.

Expert Advisors in these styles

Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.

Browse Expert Advisors