News trading · MT4 · MT5

News Trader

by EarnForex

News Trader is a semi-automatic expert advisor for MetaTrader 4 and MetaTrader 5 designed to execute trades around high-volatility economic announcements.

GitHub stars55
Forks18
Last update1 year ago8 Aug 2025
LicenceApache-2.0
Latest release1.122 years ago

Overview

Users manually input the scheduled news release time, and the robot opens positions a specified number of seconds before the event. It supports single-direction trades, random entries, or simultaneous buy and sell orders. Risk management includes fixed or ATR-based stop-loss and take-profit levels, a trailing stop, and a breakeven function. It also features a spread fuse to block execution during excessive spreads and an automated time-based exit.

Details

Author

EarnForex on GitHub

Type

News trading

Platform

MetaTrader 4 (MQL4) and MetaTrader 5 (MQL5)

Strategy

News, Hedging

Markets

Forex

Timeframes

Any timeframe

Risk profile

  • Holds opposite positions at once

Topics

ctraderexpert-advisorforexforex-robotforex-tradingmetatradermetatrader-4metatrader-5mql4mql5

Input parameters

Read from NewsTrader.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
NewsTimedatetime-1News date/time (Server)
StopLossint15Stop-loss in broker's pips
TakeProfitint75Take-profit in broker's pips.
Directiondir_enumBothDirection of the trade to open
TrailingStoptrailing_enumNoneTrailing stop type
BEOnProfitint0Profit to trigger breakeven, points
BEExtraProfitint0Extra profit for breakeven, points
TSOnProfitint0Profit to start trailing stop, points
PreAdjustSLTPboolfalsePreadjust SL/TP until news is out
SecondsBeforeint18Seconds before the news to open a trade
CloseAfterSecondsint3600Close trade X seconds after the news, 0 - turn the feature off
SpreadFusebooltrueSpreadFuse - prevent trading if spread >= stop-loss
Show all 34 inputs
NameTypeDefaultDescription
UseATRboolfalseUse ATR-based stop-loss and take-profit levels
ATR_Periodint14ATR Period
ATR_Multiplier_SLdouble1ATR multiplier for SL
ATR_Multiplier_TPdouble5ATR multiplier for TP
Lotsdouble0.01
MMbooltrueMoney Management, if true - position sizing based on stop-loss
Riskdouble1Risk - Risk tolerance in percentage points
FixedBalancedouble0FixedBalance: If > 0, trade size calc. uses it as balance
MoneyRiskdouble0MoneyRisk: Risk tolerance in account currency
UseMoneyInsteadOfPercentageboolfalseUse money risk instead of percentage
UseEquityInsteadOfBalanceboolfalseUse equity instead of balance
ShowTimerbooltrueShow timer before and after news
FontSizeint18
FontstringArial
FontColorcolorclrRed
CornerENUM_BASE_CORNERCORNER_LEFT_UPPER
X_Distanceint10X-axis distance from the chart corner
Y_Distanceint130Y-axis distance from the chart corner
Slippageint3
Magicint794823491
CommentarystringNewsTraderComment - trade description (e.g. "US CPI", "EU GDP", etc.)
IgnoreECNModebooltrueIgnoreECNMode: Always attach SL/TP immediately

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone EarnForex/News-Trader from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts or MQL5/Experts.
  3. 3Copy the filesCopy the .mq4 / .mq5 file into Experts.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

Forex Factory News Scraper

by NathanaelPeters
2 stars

This MetaTrader 5 expert advisor automates news trading by integrating with an external Python web scraper. The Python component extracts economic calendar data from Forex Factory and saves it to a local file, which the EA monitors in real-time. Minutes before scheduled news events, the bot executes a straddle strategy

MT5 News trading NewsBreakoutHedging
Updated 6 years ago None stated GitHub repository of Forex Factory News Scraper

JB News Bot

by jblanked
31 stars

JB News Bot is an automated trading expert advisor for MetaTrader 4 and MetaTrader 5 that executes positions based on scheduled economic data releases. It interfaces with the JBlanked News API to fetch calendar events from sources including MQL5, Forex Factory, and FXStreet. The EA allows users to configure specific en

MT4MT5 News trading News
Updated 3 months ago MIT GitHub repository of JB News Bot

Amazing

by EarnForex
24 stars

Amazing is a news trading expert advisor for MetaTrader 4 and 5 designed to capture volatility during scheduled economic announcements. It operates as a semi-automatic tool, requiring the user to manually input the specific date and time of an upcoming news event. The EA places two symmetrical pending orders at a defin

MT4MT5 News trading News
Updated 3 years ago Apache-2.0 GitHub repository of Amazing

Onews9 News Trader

by oleg518
16 stars

This MetaTrader 5 expert advisor is designed for news trading by managing pending orders around scheduled economic events. The robot places orders at a specific start time and dynamically shifts their distance from the market price until the news release triggers a breakout. It features a trailing stop that can be exec

MT5 News trading NewsBreakout
Updated 2 years ago None stated GitHub repository of Onews9 News Trader

Event Trader

by fhlee74
8 stars

Event Trader is a news-trading utility for MetaTrader 4 designed to automate straddle entries around scheduled economic releases. The EA places buy-stop and sell-stop orders at a user-defined GMT time and distance from the current market price. It incorporates one-cancels-the-other logic to delete the opposing pending

MT4 News trading NewsBreakout
Updated 6 years ago GPL-3.0 GitHub repository of Event Trader

Forex News Killer

by Ahmed-GoCode
6 stars

Forex News Killer is a risk management utility for MetaTrader 4 designed to protect accounts from volatility during high-impact economic news. The tool monitors real-time calendars and automatically intervenes based on user-defined time buffers before and after events. It can close open positions, remove pending orders

MT4 News trading News
Updated 10 months ago None stated GitHub repository of Forex News Killer

More news EAs

Need a broker for MT4/MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers