News trading EAs automate the process of trading high-impact economic releases — NFP, CPI, FOMC decisions, central bank rate announcements. The potential for large moves in seconds makes these events attractive targets for automation. The execution complexity and risk, however, make news EAs among the most technically demanding to build and the most likely to fail in live trading. This guide covers the mechanics, strategies, and realities of news trading automation.
Risk warning: News trading involves extreme volatility and liquidity risk. Spreads can widen to 10–50 pips during high-impact events. Losses can exceed expectations. See our risk disclosure.
Why News Events Are Unique for Trading
Major economic releases create specific, predictable opportunities that differ from normal market behavior:
Price movement: High-impact releases like NFP (Non-Farm Payrolls) regularly move EUR/USD 50–150 pips within seconds of the release. This creates opportunity for strategies that can capture directional momentum.
Market inefficiency window: In the first 1–5 seconds after a release, the market digests the data and moves rapidly to a new equilibrium. Traders who position correctly in this window can capture significant moves with defined risk.
Predictable timing: Economic releases are scheduled weeks in advance. The exact time (typically 8:30 AM ET for US data) is known, allowing automated strategies to prepare precisely.
The catch: Spreads widen dramatically in the moments before and immediately after releases. Liquidity evaporates. Slippage on stop orders can be severe. Requotes are common with market maker brokers. The same predictability that makes news events attractive also ensures the market's defensive mechanisms (wider spreads, reduced liquidity) are in full force.
Types of News Trading Strategies
Straddle (Bracket Order Strategy)
How it works: Place a pending buy order above the current price and a pending sell order below the current price, both some distance from the current market. When the news hits and price breaks in either direction, one order executes.
Setup (typically 2–5 minutes before release):
- Current EUR/USD: 1.0850
- Place buy stop at 1.0870 (+20 pips)
- Place sell stop at 1.0830 (-20 pips)
- Stop loss on the triggered order: 30 pips from entry
- Take profit: 50–100 pips from entry
- Cancel both orders if not triggered within X minutes of release
Advantages: Direction-agnostic — profits regardless of whether the release is better or worse than expected. Simple to understand.
Disadvantages: Initial spike can trigger both orders in a whipsaw. Spread widening means the effective entry price is worse than the pending order price. False breakouts are common.
Sentiment Direction Strategy
How it works: Pre-analyze the release and enter in the expected direction based on a model that predicts whether the actual figure will beat or miss consensus expectations.
Inputs: Economic forecasting models, alternative data (credit card spending, satellite imagery), historical release patterns, Fed Nowcasts, Bloomberg consensus evolution.
Reality check: This approach is used by institutional traders with sophisticated proprietary data. Retail traders using publicly available data are competing against Citadel, Two Sigma, and Bloomberg Terminal subscribers. The advantage evaporates quickly.
Post-Release Momentum (Most Practical)
How it works: Don't try to trade the initial spike. Wait for the dust to settle (30–90 seconds after release), identify the direction of the sustained move, and enter in that direction with trend.
Setup:
- Wait X seconds after release
- Check if price has moved more than Y pips from pre-release level
- Enter in the direction of the move with a trail stop
- Exit after Z pips of move or at session close
Advantages: Avoids the worst of the spread widening. Enters after direction is established. Easier to backtest meaningfully.
Disadvantages: Misses the largest initial moves. False directional moves can reverse after 1–2 minutes.
Building a News EA in MQL5
A complete news EA requires three components: news calendar integration, order management, and risk controls.
Component 1: News Calendar Integration
MT5 doesn't provide built-in access to an economic calendar. Options:
Option 1: Hard-coded schedule
Store release times as timestamps in the EA code. Update manually before each week:
// Hard-coded news events (update weekly)
struct NewsEvent {
string currency;
datetime eventTime;
int impactLevel; // 1=low, 2=medium, 3=high
};
NewsEvent newsCalendar[] = {
{"USD", D'2026.01.10 13:30', 3}, // NFP
{"USD", D'2026.01.15 13:30', 2}, // CPI
// Add events for the week
};
bool IsHighImpactNewsNear(int minutesBefore = 5, int minutesAfter = 15)
{
datetime currentTime = TimeCurrent();
for(int i = 0; i < ArraySize(newsCalendar); i++)
{
if(newsCalendar[i].impactLevel >= 3)
{
long diff = (long)(newsCalendar[i].eventTime - currentTime);
if(diff >= -minutesAfter * 60 && diff <= minutesBefore * 60)
return true;
}
}
return false;
}Option 2: MQL5 Economic Calendar (built-in, MT5 5.0.3270+)
Recent MT5 versions include a built-in economic calendar API:
// Get upcoming high-impact events
MqlCalendarEvent events[];
MqlCalendarValue values[];
datetime startTime = TimeCurrent();
datetime endTime = startTime + 7 * 24 * 3600; // Next 7 days
CalendarValueHistory(values, startTime, endTime, NULL, NULL);
// Filter by importance and currencyOption 3: Web request to external API
// MT5 can make HTTP requests (must be enabled in settings)
string url = "https://your-calendar-api.com/events?currency=USD&impact=high";
string headers;
char data[];
string response;
WebRequest("GET", url, headers, 0, data, response, headers);
// Parse JSON responseComponent 2: Straddle Order Placement
input int PipsFromPrice = 20; // Distance for pending orders
input int StopLossPips = 30; // Stop loss
input int TakeProfitPips = 80; // Take profit
input int CancelAfterMin = 5; // Cancel pending if not triggered
ulong buyTicket = 0, sellTicket = 0;
datetime ordersPlacedAt = 0;
void PlaceStraddle()
{
double ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
double bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
double mid = (ask + bid) / 2.0;
double pip = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE) * 10;
// Buy stop above current price
MqlTradeRequest reqBuy; MqlTradeResult resBuy;
ZeroMemory(reqBuy);
reqBuy.action = TRADE_ACTION_PENDING;
reqBuy.symbol = _Symbol;
reqBuy.type = ORDER_TYPE_BUY_STOP;
reqBuy.volume = CalculateLotSize(1.0, StopLossPips);
reqBuy.price = mid + PipsFromPrice * pip;
reqBuy.sl = reqBuy.price - StopLossPips * pip;
reqBuy.tp = reqBuy.price + TakeProfitPips * pip;
reqBuy.expiration = TimeCurrent() + CancelAfterMin * 60;
reqBuy.type_time = ORDER_TIME_SPECIFIED;
reqBuy.magic = 77001;
if(OrderSend(reqBuy, resBuy)) buyTicket = resBuy.order;
// Sell stop below current price
MqlTradeRequest reqSell; MqlTradeResult resSell;
ZeroMemory(reqSell);
reqSell.action = TRADE_ACTION_PENDING;
reqSell.symbol = _Symbol;
reqSell.type = ORDER_TYPE_SELL_STOP;
reqSell.volume = CalculateLotSize(1.0, StopLossPips);
reqSell.price = mid - PipsFromPrice * pip;
reqSell.sl = reqSell.price + StopLossPips * pip;
reqSell.tp = reqSell.price - TakeProfitPips * pip;
reqSell.expiration = TimeCurrent() + CancelAfterMin * 60;
reqSell.type_time = ORDER_TIME_SPECIFIED;
reqSell.magic = 77001;
if(OrderSend(reqSell, resSell)) sellTicket = resSell.order;
ordersPlacedAt = TimeCurrent();
}Component 3: Risk Controls
void CancelUnfilledOrders()
{
// If one order triggered, cancel the other
// (Prevents both sides from filling in a whipsaw)
bool hasBuyPos = PositionExists(ORDER_TYPE_BUY, 77001);
bool hasSellPos = PositionExists(ORDER_TYPE_SELL, 77001);
if(hasBuyPos && sellTicket > 0)
{
MqlTradeRequest req; MqlTradeResult res;
ZeroMemory(req);
req.action = TRADE_ACTION_REMOVE;
req.order = sellTicket;
OrderSend(req, res);
sellTicket = 0;
}
if(hasSellPos && buyTicket > 0)
{
MqlTradeRequest req; MqlTradeResult res;
ZeroMemory(req);
req.action = TRADE_ACTION_REMOVE;
req.order = buyTicket;
OrderSend(req, res);
buyTicket = 0;
}
}Why News EAs Typically Underperform in Live Trading
Spread widening kills the edge: Brokers widen spreads aggressively before and during high-impact releases. A 20-pip straddle distance that was calculated on a 0.5-pip spread may execute at 5–10 pip spread — effectively reducing the real distance to 15 pips from a spread-adjusted perspective.
Slippage on stops: Pending orders execute at the next available price. During rapid news moves, "next available price" can be several pips away from the order price. In the backtest, orders execute at exactly the specified price. In live trading, they don't.
Both orders can fill: In a fast, volatile move that reverses quickly, both the buy stop and sell stop can trigger before either order's other side is cancelled. This produces two losing positions — the worst-case news scenario.
Broker restrictions: Some regulated brokers prohibit news scalping strategies or have minimum stop distance requirements that prevent the tight straddle orders the EA needs.
VPS latency: News EAs require your MT5 to be running on a VPS with low latency to the broker's server. A 200ms latency is the difference between executing at the initial move and executing 40 pips into the move.
Realistic Performance Expectations for News EAs
Live performance data for legitimate news-trading EAs (from verified Myfxbook accounts):
Straddle strategies:
- Profitable in approximately 40–55% of events (often less after spread costs)
- Average win: 30–60 pips when profitable
- Average loss: 40–60 pips (including both sides of whipsaw events)
- Expected annual P&L: marginally positive to negative after costs for most implementations
Post-release momentum:
- More consistent than straddle — avoids worst spread widening
- Lower max gain (misses the initial spike)
- Better suited to ECN execution environments
- Realistic expected annual return: 10–25% with high variance
News trading EAs are more viable as a component in a diversified portfolio (e.g., providing uncorrelated returns during event periods) than as a standalone strategy.
Frequently Asked Questions
Does my broker allow news trading EAs?
Check your broker's terms. Some brokers (especially market makers) explicitly prohibit news scalping. ECN/STP brokers generally allow it but cannot guarantee execution at the ordered price during extreme volatility. Confirm before deploying.
What VPS is needed for news trading?
Low latency to your broker's server is critical — ideally sub-10ms. For US data releases, a VPS on NY4 (Equinix New York) collocated with the same data center as your broker is optimal. See Best VPS for Forex EA Trading 2026 for specifics.
Can I backtest a news EA meaningfully?
Partially. The backtest shows price movement after releases but not spread behavior. A news EA backtest without spread widening simulation will systematically overstate profitability. At minimum, test with a spread of 5–10 pips applied during the news window to simulate realistic conditions.
Which events are best for news trading EAs?
NFP, FOMC decisions, CPI, and central bank interest rate decisions have the most consistent, large moves. ECB and BOE meetings for EUR and GBP pairs respectively. Tier-2 events (Retail Sales, Durable Goods) have smaller, less reliable moves.
News trading involves extreme market conditions that can result in larger-than-expected losses. All automated forex trading involves risk of capital loss.
William Harris is the founding editor of Forex Robot Easy. He has spent over a decade building and reviewing algorithmic trading systems on MetaTrader 4 and 5, with a focus on machine learning, walk-forward validation, and execution mechanics.