News Events & Strategy Filters: When to Trade and When to Sit Out
News Events & Strategy Filters: When to Trade and When to Sit Out
Most algorithmic strategies are quietly profitable for weeks, then give back a month of gains in a single afternoon. The culprit is almost always the same: an economic release the strategy was never designed to handle. If you run EAs on a VPS without proper filters, you are rolling dice every time a central banker steps up to a microphone.
This guide covers the filters that separate surviving algos from blown accounts. We will walk through news blackouts, session windows, volatility gates, and time-of-day patterns, with code you can drop into MT4/MT5 today.
Why News Kills Algo Strategies
Your strategy was backtested on historical candles where each bar looks orderly. The backtest never showed you what actually happened inside that candle: the spread on EURUSD jumping from 0.8 pips to 14 pips for eleven seconds, your stop getting filled 23 pips beyond where you placed it, or price gapping clean through your take-profit and reversing before the next tick arrived.
Here is what happens during a high-impact release like Non-Farm Payrolls:
- Spread blowout. Liquidity providers pull their quotes. The bid-ask spread on major pairs can widen 10-20x for 5-30 seconds. On crosses and exotics, spreads can go triple digits.
- Slippage. Even if your EA fires an order at the perfect moment, there is no liquidity at your requested price. Market orders fill at whatever is available. Limit orders simply do not trigger because price skips the level entirely.
- Stop hunting. Price spikes in both directions within seconds. The initial move frequently reverses before settling on a direction. Both longs and shorts get stopped out on the same candle.
- Gap risk. On indices and some FX pairs around weekend events or surprise announcements, price can open hundreds of pips from the previous close.
Most mean-reversion, scalping, and trend-following strategies are designed for “normal” market microstructure, where there is consistent liquidity, predictable spread behavior, and orderly price discovery. News events break every one of those assumptions.
The solution is not to build a strategy that handles every regime. It is to know which regime you are in and sit out when conditions are hostile.
The Big Events Calendar
Not all economic releases are equal. We categorize them into three tiers based on their typical market impact.
Tier 1 (Red Flag / Must Filter)
These events routinely move major pairs 50-150 pips and indices 1-3% in minutes:
| Event | Frequency | Instruments Most Affected |
|---|---|---|
| US Non-Farm Payrolls (NFP) | Monthly (first Friday) | All USD pairs, US indices, gold |
| FOMC Rate Decision & Statement | 8x per year | Everything |
| US CPI / Core CPI | Monthly | USD pairs, bonds, gold, indices |
| ECB Rate Decision | 6x per year | EUR pairs, DAX |
| Bank of England Rate Decision | 8x per year | GBP pairs, FTSE |
| Bank of Japan Rate Decision | 8x per year | JPY pairs, Nikkei |
| US GDP (Advance) | Quarterly | USD pairs, indices |
If your algo trades any instrument correlated to the USD, filter all Tier 1 USD events. Period.
Tier 2 (Orange / Filter for Affected Instruments)
These events move the relevant currency 30-80 pips. You may not need a universal blackout, but you should filter them for directly affected pairs:
- PMI data (ISM Manufacturing, Services PMI)
- Retail Sales (US, UK, Eurozone)
- Employment data (ADP, Jobless Claims, UK Employment)
- Central bank minutes (FOMC Minutes, ECB Minutes)
- Trade Balance (major economies)
- RBA / RBNZ / SNB rate decisions
Tier 3 (Yellow / Monitor Only)
Low-impact releases that rarely move markets more than 15-20 pips. Generally safe to trade through, but worth logging:
- Housing data, building permits, consumer confidence, factory orders, PPI (unless it is diverging wildly from CPI), Beige Book
Rule of thumb: if you are unsure whether to filter an event, filter it. One skipped trade costs you nothing. One unfiltered NFP can cost you a week of profits.
Building a News Filter
Data Sources
You need a machine-readable economic calendar. The main options:
- MQL5 Built-in Calendar (MT5 only). The
MqlCalendarValueand related functions give you direct access to the MetaTrader economic calendar with no external dependencies. This is the cleanest solution for MT5. - ForexFactory scraping. ForexFactory publishes a weekly calendar. Many traders parse the HTML or use community-maintained CSV feeds. Fragile but widely used.
- Investing.com API. Unofficial endpoints exist, but they change without notice. Not recommended for production.
- Paid APIs. Services like FXStreet, TradingEconomics, and MQL5.community signals offer stable, documented APIs. Worth the cost if your account size justifies it.
Blackout Window Logic
The core concept is simple: define a window around each event during which no new trades are opened. We typically use:
- Tier 1: No new trades from 30 minutes before to 30 minutes after the event.
- Tier 2: No new trades from 15 minutes before to 15 minutes after.
- Tier 3: No filter, or a 5-minute window if you are conservative.
For most strategies, 30/30 on Tier 1 events is the minimum viable filter.
What About Open Positions?
You have three options when a Tier 1 event hits while you have an open trade:
- Close before the event. Safest. You book whatever P/L you have and re-enter after the blackout clears.
- Widen stops temporarily. Riskier. You move your stop to avoid the spike, accepting larger potential loss in exchange for staying in the trade.
- Hold and hope. Worst option for most strategies. The only exception is a long-term swing trade where the stop is already far from current price.
We recommend option 1 for scalpers and intraday strategies. Option 2 only makes sense if your strategy has a proven edge that survives news events in backtesting with tick data.
Session-Based Filters
Markets do not behave the same way at all hours. A strategy that prints money during the London session can bleed during Asia, and vice versa.
The Three Sessions
| Session | Approximate Hours (UTC) | Character |
|---|---|---|
| Asian (Tokyo) | 00:00 - 08:00 | Low volatility, range-bound, thin liquidity |
| London | 07:00 - 16:00 | Highest volume, strongest trends, tightest spreads |
| New York | 12:00 - 21:00 | High volume, news-driven, afternoon fade |
The London-New York Overlap (12:00-16:00 UTC)
This is when the most volume flows through the market. Spreads are tightest and trends are strongest. Most trend-following strategies perform best during this window. If you only trade one session, trade this one.
Why Your Asian Breakout Strategy Dies at 3pm
A common retail strategy is to mark the Asian session range and trade the breakout during London open. The logic is sound: price consolidates in Asia, then directional players push price out of the range when London liquidity arrives.
The problem is that many traders hold these positions into the New York session. By 15:00 UTC, the initial London move has often exhausted itself. New York traders frequently fade the London move, driving price back into (or through) the Asian range. If your stop is still sitting at the other side of the Asian range, you are giving back the entire move.
Fix: set a hard exit time. If your Asian breakout trade is not at target by 14:00-15:00 UTC, close it. Do not let a session-specific strategy bleed into the next session.
Volatility Filters
Not all “normal” market conditions are equal. Sometimes volatility is too high for a mean-reversion strategy. Sometimes it is too low for a breakout strategy.
ATR-Based Filters
The Average True Range (ATR) is the simplest volatility proxy. Calculate the ATR(14) on your trading timeframe and compare it to a rolling average:
- Too hot: If current ATR is more than 2x the 50-period average ATR, spreads are likely widening and your strategy’s stop distances may be inadequate. Consider pausing entries.
- Too cold: If current ATR is less than 0.4x the 50-period average, the market is in a compression phase. Breakout strategies will generate false signals. Mean-reversion strategies may thrive.
VIX for Index Traders
If you trade US indices (SPX500, NAS100, US30), the VIX is a direct measure of implied volatility. General thresholds:
- VIX below 14: Low volatility. Range strategies perform well, trend strategies struggle.
- VIX 14-22: Normal conditions. Most strategies operate within designed parameters.
- VIX above 25: Elevated volatility. Tighten risk or pause. Spreads on index CFDs widen significantly.
- VIX above 35: Crisis-level volatility. Unless you have a strategy specifically designed for this, step aside entirely.
Adaptive Thresholds
Hard-coded thresholds break over time because volatility regimes shift. A better approach is to use percentile-based thresholds:
- Calculate the ATR percentile over the last 252 bars (one trading year on daily).
- Trade only when ATR is between the 20th and 80th percentile.
- This automatically adjusts as the market’s baseline volatility changes.
Day-of-Week and Time-of-Day Patterns
Monday
Gaps from weekend news. Spread is typically wider at the Sunday/Monday open. Some brokers re-quote aggressively for the first 30-60 minutes. Many algos skip the first hour entirely.
Tuesday through Thursday
The “clean” days. Most strategies produce the bulk of their returns during these sessions. Trend days occur most frequently on Tuesday and Wednesday.
Friday
Position squaring ahead of the weekend. Institutional traders close positions to reduce weekend gap risk. This creates counter-trend moves in the afternoon (New York session). If your strategy is trend-following, consider closing entries by 14:00 UTC on Fridays. NFP Fridays (first Friday of each month) deserve a full blackout until at least 30 minutes after the release.
The Dead Zone
Between roughly 16:00-17:30 UTC (12:00-1:30pm EST), there is a well-documented lull in most markets. London traders are winding down, New York is at lunch. Volume drops, spreads can widen, and price action becomes choppy and directionless. Many professional algo operators exclude this window entirely.
Seasonal Patterns
Thin liquidity during the last two weeks of December routinely causes erratic price action. Bank holiday Mondays in the UK and US can produce similar conditions. Consider reducing position sizes or pausing strategies entirely during known low-liquidity periods.
Implementation in MT4/MT5
Here are practical code patterns you can integrate into your EAs.
Time-of-Day Filter
// Only trade during London-New York overlap
bool IsWithinTradingHours()
{
MqlDateTime dt;
TimeGMT(dt);
int hour = dt.hour;
int minute = dt.min;
int totalMinutes = hour * 60 + minute;
int sessionStart = 8 * 60; // 08:00 UTC
int sessionEnd = 16 * 60; // 16:00 UTC
return (totalMinutes >= sessionStart && totalMinutes < sessionEnd);
}
Day-of-Week Filter
bool IsTradingDay()
{
MqlDateTime dt;
TimeGMT(dt);
// Skip Monday before 08:00 UTC and Friday after 14:00 UTC
if(dt.day_of_week == 1 && dt.hour < 8) return false;
if(dt.day_of_week == 5 && dt.hour >= 14) return false;
// Skip weekends (should not fire on VPS, but safety check)
if(dt.day_of_week == 0 || dt.day_of_week == 6) return false;
return true;
}
News Blackout (MT5 Built-in Calendar)
bool IsNewsBlackout(int minutesBefore = 30, int minutesAfter = 30)
{
datetime now = TimeGMT();
datetime from = now - minutesBefore * 60;
datetime to = now + minutesAfter * 60;
MqlCalendarValue values[];
int count = CalendarValueHistory(values, from, to);
for(int i = 0; i < count; i++)
{
MqlCalendarEvent event;
CalendarEventById(values[i].event_id, event);
// Filter only high-impact events
if(event.importance == CALENDAR_IMPORTANCE_HIGH)
return true;
}
return false;
}
ATR Volatility Gate
bool IsVolatilitySuitable(string symbol, ENUM_TIMEFRAMES tf, int atrPeriod = 14, int lookback = 50)
{
double atrBuffer[];
ArraySetAsSeries(atrBuffer, true);
int atrHandle = iATR(symbol, tf, atrPeriod);
CopyBuffer(atrHandle, 0, 0, lookback + 1, atrBuffer);
double currentATR = atrBuffer[0];
// Calculate average ATR over lookback
double avgATR = 0;
for(int i = 1; i <= lookback; i++)
avgATR += atrBuffer[i];
avgATR /= lookback;
// Trade only when ATR is between 0.5x and 2.0x average
if(currentATR < avgATR * 0.5 || currentATR > avgATR * 2.0)
return false;
return true;
}
Combining Filters in Your EA
void OnTick()
{
// Gate all new entries through filters
if(!IsWithinTradingHours()) return;
if(!IsTradingDay()) return;
if(!IsVolatilitySuitable(_Symbol, PERIOD_H1)) return;
// MT5 only:
if(!MQLInfoInteger(MQL_TESTER) && IsNewsBlackout(30, 30)) return;
// --- Your strategy logic below ---
// ...
}
Note the MQL_TESTER check in the news filter. The economic calendar is not available in the backtester, so you need to skip that check during optimization runs. This is one of the inherent limitations of backtesting news-filtered strategies: your historical results will include trades that the live filter would have blocked. Keep this in mind when evaluating performance.
Handling Open Positions During News
void ManagePositionsBeforeNews()
{
if(!IsNewsBlackout(15, 0)) return; // 15 min before event
for(int i = PositionsTotal() - 1; i >= 0; i--)
{
ulong ticket = PositionGetTicket(i);
if(PositionSelectByTicket(ticket))
{
if(PositionGetString(POSITION_SYMBOL) == _Symbol)
{
// Option 1: Close the position
MqlTradeRequest request = {};
MqlTradeResult result = {};
request.action = TRADE_ACTION_DEAL;
request.position = ticket;
request.symbol = _Symbol;
request.volume = PositionGetDouble(POSITION_VOLUME);
request.type = (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
? ORDER_TYPE_SELL : ORDER_TYPE_BUY;
request.price = (request.type == ORDER_TYPE_SELL)
? SymbolInfoDouble(_Symbol, SYMBOL_BID)
: SymbolInfoDouble(_Symbol, SYMBOL_ASK);
request.deviation = 20;
OrderSend(request, result);
}
}
}
}
The Counterargument: When News Is the Strategy
Everything above assumes your strategy was not designed for news events. But some strategies are.
News breakout strategies deliberately enter during high-impact releases, betting on the directional move that follows. Straddle orders placed above and below the pre-news range, momentum entries triggered by the initial spike, and fade setups that counter the first move are all legitimate approaches.
These strategies have different requirements:
- Wider stops. You are trading the spike, not avoiding it. Stops need to account for the full range of the initial move, not normal ATR-based distances.
- Faster execution. Latency matters more during news than at any other time. This is where a VPS co-located near your broker’s servers makes a measurable difference. A 50ms advantage during NFP is the difference between getting filled at your price or getting filled 15 pips worse.
- Spread awareness. Your entry logic needs to check the current spread before entering. If the spread is 12 pips on EURUSD, your 20-pip take-profit is already underwater before the trade starts.
- Selective events. Even news traders do not trade every event. Most focus exclusively on Tier 1 events where the move is large enough to overcome the execution costs.
If you run a news-specific strategy, your filters work in reverse: you only trade during events and sit out during “normal” conditions.
Putting It All Together
The best algo traders we work with (and we see a lot of strategies running across our VPS infrastructure) do not just have a good entry signal. They have layers of filters that keep the strategy out of conditions where it has no edge.
A solid filter stack looks like this:
- Session filter — only trade during your strategy’s proven session.
- Day-of-week filter — skip problematic days or hours.
- News blackout — no new entries around Tier 1 and Tier 2 events.
- Volatility gate — pause when ATR is outside the normal range.
- Spread check — reject entries when the spread exceeds a threshold (e.g., 2x the normal spread for the instrument).
Each filter you add will reduce your trade count. That is the point. You are cutting the trades that were most likely to be losers. In our experience, a well-filtered strategy with 40% fewer trades typically produces higher net profit than the unfiltered version, because the trades it skips were disproportionately losers.
Run your VPS, run your filters, and let the edge work in the conditions it was designed for.