News trading · MT5

DayBlocker

by th48ad

DayBlocker is a utility expert advisor for MetaTrader 5 that manages the global AutoTrading state based on economic events.

GitHub stars1
Forks0
Last update4 months ago4 May 2026
LicenceNone stated

Overview

DayBlocker monitors the built-in MQL5 calendar and a manual text file for high-impact news such as Flash PMI, FOMC meetings, and Non-Farm Payrolls. When a specific event is detected for the current day, the software uses the Windows API to toggle the terminal's AutoTrading button, effectively pausing all active expert advisors. It features automated broker GMT offset detection and a configurable hour to re-enable trading on the following day. It acts as a safety layer for volatility-sensitive strategies.

Details

Author

th48ad on GitHub

Type

News trading

Platform

MetaTrader 5 (MQL5)

Strategy

News

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

EA files

Input parameters

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

NameTypeDefaultDescription
InpBlockFlashPMIbooltrueBlock Flash PMI days (US + EUR)
InpBlockTrumpSpeaksboolfalseBlock ALL Trump Speaks days (too many!)
InpBlockFOMCDecisionboolfalseBlock FOMC Rate Decision days
InpBlockNFPboolfalseBlock Non-Farm Payrolls days
InpBlockCPIboolfalseBlock CPI days
InpBlockGDPboolfalseBlock GDP days
InpBlockPPIboolfalseBlock PPI days
InpBlockFOMCMinutesboolfalseBlock FOMC Minutes days
InpBlockPowellSpeaksboolfalseBlock Fed Chair Powell days
InpBlockISMboolfalseBlock ISM Manufacturing PMI days
InpBlockRetailSalesboolfalseBlock Retail Sales days
InpBlockEmpireStateboolfalseBlock Empire State Mfg Index days
Show all 24 inputs
NameTypeDefaultDescription
InpUseBlockFilebooltrueUse blocked_dates.txt file
InpBlockFilePathstringblocked_dates.txtPath to blocked dates file (in MQL5/Files/)
InpCurrenciesstringUSD,EURCurrencies to check (comma-separated)
InpCheckIntervalSecint60Check interval (seconds)
InpBrokerGMTOffsetint3Broker GMT offset FALLBACK (Coinexx=3, EXNESS=0). Auto-detected if possible.
InpReEnableHourint1Re-enable hour in BROKER time (next day). E.g. 1 = 01:00 broker = 22:00 UTC on GMT+3
InpReEnableNextDaybooltrueAuto re-enable on next non-blocked day
InpTestModeboolfalseTEST MODE: Block today regardless of news
InpDryRunboolfalseDRY RUN: Log only, don't actually toggle AutoTrading
InpShowPanelbooltrueShow status panel
InpBlockedColorcolorclrRedPanel color when blocked
InpActiveColorcolorclrLimePanel color when active

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone th48ad/DayBlocker from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .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

News Trader

by EarnForex
55 stars

News Trader is a semi-automatic expert advisor for MetaTrader 4 and MetaTrader 5 designed to execute trades around high-volatility economic announcements. 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 trad

MT4MT5 News trading NewsHedging
Updated 1 year ago Apache-2.0 GitHub repository of News Trader

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

News Filter MQL5

by sushiix-trader
3 stars

This news filter module for MetaTrader 5 provides a framework for Expert Advisors to avoid trading during high-impact economic events. It features a dual-layer system: a decision layer that blocks new entries and an action layer that can flatten current positions or cancel pending orders. The tool supports live termina

MT5 News trading News
Updated 12 days ago Apache-2.0 GitHub repository of News Filter MQL5

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

More news EAs

Need a broker for MT5?

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

Compare brokers