EnglishNederlandsPortuguesEspanolDeutschFrancais

News Filter EA: What It Should Actually Do

By 6 min read automation Published:

A news filter EA is not a prediction engine. It does not know whether an inflation release will beat expectations or which direction price will move. Its job is narrower and more useful: identify scheduled events, apply a documented trading policy, and prevent the strategy from entering execution conditions it was not designed to handle.

That sounds simple until account rules, timezones, pending orders, and open positions are involved. A filter that only checks whether a red calendar icon is nearby is not enough for prop-firm use. It needs deterministic behaviour before, during, and after the event, including a safe response when the calendar feed fails.

Why scheduled news changes execution

Important releases can reduce available liquidity while orders are being repriced. Spreads may widen, slippage can increase, and a stop or pending order may fill at a different price from the level shown on the chart. The strategy can be logically correct and still receive an execution outcome that was absent from an ordinary backtest.

Prop-firm rules add another layer. One programme may allow news trading during an evaluation but restrict it at the funded stage. Another may allow the trade but adjust how a profitable news-time execution is treated. Some plans use blackout periods, while others permit holding an existing position but apply conditions to opening, closing, or triggering pending orders.

This is why a generic on-or-off switch is inadequate. The filter needs a policy for the exact account, phase, and instrument.

What the filter must read

At minimum, the event record needs a scheduled time, affected currency or country, importance level, and a stable event identifier. The EA then maps that event to the symbols it trades.

The obvious mapping is not always the complete one. A dollar event can affect a pair containing USD, but it can also be relevant to gold. Index symbols and broker-specific names need an explicit mapping table. Symbol suffixes must be normalised before the filter decides that an event is unrelated.

Where the event data comes from also matters. MetaTrader 5 exposes a built-in economic calendar to MQL5 programs, and those functions work in trade-server time, so an event cannot be compared against the computer's local clock without a conversion. MetaTrader 4 has no equivalent calendar interface for an expert advisor, so a filter there has to read an imported schedule or an external feed, which makes the timezone of that source one more thing to confirm. Daylight-saving changes and broker server changes need testing rather than assumptions.

A proper event state machine

Reliable filters are easier to reason about when they use defined states.

Normal state: The strategy can evaluate signals and manage trades according to its usual rules.

Pre-event state: New entries are blocked for affected symbols. The policy decides whether unfilled pending orders are cancelled, retained, or prevented from moving closer to market.

Restricted state: This is the event window itself. The EA follows the selected account's rule for open positions, stops, targets, partial closures, and pending-order activation. It must not assume that holding is equivalent to modifying or closing.

Cooldown state: New entries remain blocked until the configured post-event period ends and execution conditions have normalised.

Each transition should be logged with the event name, affected symbols, source timestamp, and chosen action. A trader should never have to guess why the EA stopped or resumed.

Open trades need a separate policy

Blocking a fresh entry is easy. Handling a position that is already open requires a deliberate choice.

One policy is to hold the position and leave its original protection unchanged. That may suit a swing strategy when the account permits holding through news. Another policy is to close before the restricted period. That changes the tested exit logic and should only be used if it is part of the strategy specification. Tightening a stop immediately before a release can make the trade more likely to close in a spread spike, so it is not automatically safer.

Pending orders need their own treatment. A stop or limit placed well before an event can still activate during a restricted window. A take-profit, stop-loss, or partial closure may also count as a closing execution under the firm's rules. The filter must model these cases explicitly.

Check the current plan terms rather than applying one firm's settings to another. The JPTC guides for FTMO, FundedNext, and FXIFY provide a starting point for that account-level review.

Fail closed when event data is unreliable

A missing calendar response should not be interpreted as a quiet day. If the EA cannot confirm that its event data is current, the safer operational state is to block affected new entries and report the fault.

The implementation should detect event data that is unavailable or stale, an empty response where events were previously expected, a time conversion that returned an invalid result, a broker symbol or suffix that has changed, a terminal restart that happened during a restricted window, and loss of network access to an external calendar. Each of those is a reason to stop and raise a warning, not a reason to continue quietly.

Cached events can keep the filter useful during a short interruption, but the cache needs an age limit and visible status. Manual override should be recorded, time-limited, and disabled by default on managed configurations.

Backtesting a news filter correctly

The filter must be tested with historical event data that was genuinely available for the tested period. Current calendar entries cannot be projected backwards, and revised release times cannot silently replace what was known then.

MetaQuotes documents a limitation that matters here. The MQL5 calendar functions cannot be called inside the strategy tester, where they return a not-allowed error. A robust test therefore records event history while the program runs on a live chart, then loads that fixed dataset during the tester run. The timestamps must be aligned with historical server time, including daylight-saving changes.

The execution model also matters. A test that applies an ordinary fixed spread during major releases cannot show whether the filter protects the strategy from the intended conditions. Use conservative spread and slippage assumptions, and review four groups separately: ordinary trades, signals the filter blocked and therefore never traded, positions held through an event, and positions closed before one.

A filter passes validation when its decisions are reproducible and its rule handling is correct. It should not be judged only by whether removing a few losing trades makes a backtest look better.

Configuration questions for EA buyers

Before using any news-aware trading tool, work through the following with the vendor.

Calendar source. Which feed does it use, and what happens when that feed is unavailable?

Event mapping. Does it map events by currency, country, symbol, or a manual list, and can that mapping be edited for broker-specific names?

Clock. Which clock defines the event window, and has the conversion been tested across a daylight-saving change?

Window controls. Can the pre-event and post-event periods be configured separately, and per symbol?

Order handling. What happens to pending entries, stops, targets, and partial closures inside a restricted window?

Restart behaviour. Does the EA restore the active event state after a terminal restart?

Account differences. Can the settings differ by prop-firm plan and account phase?

Test evidence. Was the filter tested with historical event records and realistic execution assumptions?

Clear answers matter more than a long list of calendar settings. The filter should be understandable enough that its behaviour can be checked against the rulebook before the account is used.

News protection is one risk layer

A news filter cannot stop an unscheduled geopolitical headline, broker outage, or sudden liquidity shock. It also cannot make an unsuitable strategy prop-firm friendly by itself. Position sizing, total exposure, daily loss controls, and restart safety remain necessary.

No software can promise a prop-firm pass. A well-built filter simply keeps scheduled-event handling consistent, visible, and aligned with the selected account's current terms.

Use the JPTC EA Hub page as the practical next step when comparing automation controls, then match every news setting to the official rules of your chosen account.

Automated forex and gold trading

Runs on your own account at your own broker. We host and set it up, so there is nothing to install and no VPS. No profit share, no monthly fee.

See how it works
Pass your prop firm | JPTC Algo
See Results →
Risk Disclaimer

Trading forex and CFDs involves significant risk and is not suitable for all investors. Past performance does not guarantee future results. You should not invest money you cannot afford to lose. The content on this page is for informational purposes only and does not constitute financial advice. JPTradingCapital does not accept liability for any loss or damage arising from reliance on the information provided. Always conduct your own research before making trading decisions.