Setting Up the Economic News Filter โ Protecting Your Account from Volatile Moves
Last updated: 2026-05-20 | Estimated reading time: 13 min
Around the release of major economic data โ such as NFP or FOMC decisions โ markets can move sharply within seconds and spreads can spike dramatically. Even a well-performing EA can suffer a significant loss from a single violent move during these windows. The economic news filter automatically pauses trading during these high-risk periods.
Contents
Why trading around news releases is dangerous
When major economic data is released, market participants react simultaneously, driving price sharply in one direction within seconds. Trying to predict the outcome is essentially impossible โ it is closer to gambling than trading.
A further problem is the deterioration in execution quality. At the moment of a release, spreads can expand to 5โ10 times their normal level and slippage increases significantly. Stop-loss orders may be filled at prices far worse than expected โ an effect known as "gapping" โ which breaks the EA's risk calculations.
Economic events that demand the most caution
The following events have the largest market impact and should be avoided around their release times.
US Non-Farm Payrolls (NFP)
Released on the first Friday of each month. US non-farm employment change. The single most market-moving release for the dollar, GOLD, and equity indices.
FOMC (US Monetary Policy)
Policy rate decision and press conference. Eight times per year. Changes in the rate outlook move all major currency pairs.
CPI (Consumer Price Index)
The key inflation indicator. Directly tied to monetary policy expectations, with a large impact on the dollar and GOLD.
Central bank policy rate decisions
ECB, Bank of Japan, Bank of England, and others. Causes sharp moves in the relevant currency pairs.
How the economic news filter works
The economic news filter monitors the economic calendar and automatically stops new entries as an upcoming event approaches. Once a set amount of time has passed after the release, trading resumes.
The EAs on this site implement this feature through a shared module called EconomicFilter.mqh. Place this file in MQL5/Include alongside your EA to activate parameters such as UseEconomicFilter.
Configuring the filter parameters
The main parameters for the economic news filter and their recommended values are listed below.
| Parameter | Default | Description |
|---|---|---|
| UseEconomicFilter | true | Enables the economic news filter |
| NewsAvoidMinutesBefore | 30 | How many minutes before a release to suspend trading |
| NewsAvoidMinutesAfter | 30 | How many minutes after a release to keep trading suspended |
| NewsImpactLevel | 2 | Minimum impact level to filter. 1 = Low and above / 2 = Medium and above / 3 = High only |
| NewsTargetCurrencies | USD,EUR,JPY | Currencies to filter (comma-separated). Leave blank to filter all currencies |
| CloseBeforeNews | false | Whether to close open positions before a news event |
When to use the filter โ and when you don't need it
The economic news filter is not a universal solution. Its value depends on the nature of the EA.
| EA type | Filter recommendation |
|---|---|
| Short-term / scalping | Strongly recommended. Most exposed to sharp moves and spread spikes |
| Day trading (H1โH4) | Recommended. Avoids unfavorable fills around news releases |
| Long-term trend following | Optional. Closing positions is rarely necessary, but pausing new entries is worthwhile |
| Martingale / grid (averaging down) | Managing position size before a release matters more than simply pausing new entries |
๐ Strengthen your defenses against sharp moves
The economic news filter is just one layer of protection. Review how to handle losing streaks and drawdown as well.
Read the drawdown guide โ