Skip to main content

News Filter Block

Want your EA to avoid high-impact news? Learn how the News Filter blocks new trades, closes open trades before events, filters by currency and event type, sets before/after windows, and works in live trading and backtests.

Introduction

The News Filter is a block that makes your EA aware of high-impact economic news. When you add it to your strategy, it checks — at the moment it runs — whether a high-impact news event is scheduled within a time window you define around the current moment. Based on that check, it sends your strategy flow down one of two paths, so you decide exactly how your EA should behave around news.

With the News Filter you can stop new trades from being opened around news, close open trades before a news event so you have no exposure while it hits, or both. It's a simple, self-contained gate: no external files, no manual calendar to maintain.

In Profectus AI you can also backtest your EA with historical news events, so you can see how the News Filter would have affected your results on past data — not just in live trading. This lets you measure the filter's impact before you ever run it live.

Why use the News Filter

High-impact news — rate decisions, inflation prints, employment reports — can cause sudden price gaps, wider spreads, and erratic movement. Trading straight through these moments exposes your strategy to slippage and unpredictable fills. Many prop firms also don't allow opening or closing trades around high-impact news events, and the News Filter helps you avoid violating those rules.

It offers several advantages:

  • Automatic currency detection. The News Filter reads the symbol your EA is trading and automatically determines which currencies are involved — for example, EURUSD maps to EUR and USD. It then only reacts to news events that belong to those currencies. You don't have to configure any of this by hand.

  • High-impact events only. The filter focuses on the events that actually move the market, ignoring low-impact noise.

  • Works live and in backtests. The same filter runs in real trading and in historical testing, so your backtests reflect how the filter behaves.

  • You stay in control. The filter only reports whether news is near — you decide, in your own strategy flow, what should happen.

How to use the News Filter

The News Filter block has two outputs: a True output and a False output. Every time the block runs, exactly one of them fires:

  • True — fires when the current time falls outside any news event window. It's safe to take a trade, so you'd typically connect this output to a trade execution block.

  • False — fires when the current time falls inside a news event window. You can use this to close any open trades before the actual news hits.

You connect whichever output matches what you want to happen. This keeps your strategy readable: you wire the outcome you mean, and the rest of your flow continues from there. See the examples below for the clearest explanation.

Setting the window: Minutes before and Minutes after

The window is defined by two fields in the block's panel:

  • Minutes before — how many minutes ahead of a news event the block should start reporting news. With 5, the block checks whether the current time is within 5 minutes before the actual event.

  • Minutes after — how many minutes after a news event the block should keep reporting news. With 5, the block checks whether the current time is within 5 minutes after the actual event.

Together they form a window around each event: from Minutes before the event, through the event itself, until Minutes after the event. Inside that window, new trades won't be opened if your trade execution block is connected to the True output of the News Filter. And inside that same window, open trades will be closed if your Close Trades block is connected to the False output.

Section 1 — Stop opening trades during a news window

The most common use is to prevent new trades from being opened before, during, and/or after a news event. To do this, place the News Filter before your entry block in the flow, and connect the True output to your trade execution block.

This works because True means "the window is clear." When a news event is inside the window, the block doesn't fire the True output, so the news is filtered out. The entry is never reached, and no trade is opened until the window has passed.

The News Filter sits just before the Buy now block. While news is in the window, entries are blocked; once clear, the flow continues to Buy now.

In the panel, Minutes before and Minutes after control how long before and after each event entries stay blocked.

Section 2 — Close open trades before a news event

You can also use the News Filter to flatten your positions ahead of news, so you carry no exposure while the event hits. For this, connect the False output of the News Filter to your Close Trades block.

Set Minutes before to the lead time you want (for example, 5 minutes before the event), and the False output drives the close so your open trades are shut before the news arrives. The False output is what you must use here — it's the output that carries your flow through to the Close Trades block. It essentially says: "We're now within the news window, let's perform the next action."

Select trades → News Filter → Close trades. The False output is wired through so open trades are closed before the news event, leaving no exposure during the news.

How to select which events are filtered

By default, all high-impact news events are filtered. This is the safest starting point and needs no configuration. If you want finer control, open Advanced options in the block's panel and use the Events dropdown to choose exactly which event types the filter should react to.

When all events are selected, the filter reacts to every high-impact event type for the traded currencies:

All events selected — the default. The filter reacts to every high-impact event type.

You can also select only the events you care about. In the example below, just a few event types are enabled, so the filter reacts only to those and ignores the rest — letting your EA keep trading through events you consider less important.

Some events selected — only the checked event types are filtered; the others are ignored.

Backtesting with the News Filter

The News Filter works in backtests as well as in live trading, so you can measure its impact on historical data. When you run a backtest with the News Filter block, Profectus AI can detect historical news events dating back to January 2015.

This means your backtest reflects how the filter would have blocked entries or closed trades around real past events, giving you a realistic picture of its effect on your results before you go live. Your window settings and selected events apply in exactly the same way during a backtest as they do in live trading.

Important: stay alert during live news

The News Filter is a tool to help you manage news risk, not a guarantee. Economic calendars can change: events are rescheduled, revised, or added at short notice, and market reactions can begin before or extend beyond any fixed window. Always keep an eye on the market yourself when live trading during news events, and don't rely on the filter alone to protect your account. Treat it as one layer of protection alongside your own risk management.

Did this answer your question?