News Filter Foghorn Economic Calendar Guard
- Utilità
-
Pitt Petruschke
Algo trader and EA developer from Germany. Founder of AlgoVerdict (algoverdict.com) – independent tests of Expert Advisors, brokers and signal platforms based on live accounts. Author of Dawnbreak, a session range breakout EA for MT5. My own EA park runs on real accounts; my signals are listed in - Versione: 1.0
High-impact news such as Non-Farm Payrolls, CPI or a central-bank rate decision can move a market in seconds: spreads widen, prices gap, pending orders fill far from where you placed them. Foghorn reads the economic calendar that is built into MetaTrader 5 and tells you when a news window is coming. If you switch it on, it also clears pending orders, closes positions and publishes a pause flag that your own EAs can read.
Free, fully working, no time limit. No nag screens, no upgrade prompts inside the program. It never opens a trade.
What it does
- Economic calendar: the MT5 built-in calendar, next 7 days, reloaded every 15 minutes and with the REFRESH button. All times are your broker's server time.
- News window around every event that counts: X minutes before and after (default 15 / 15). Overlapping windows merge into one.
- Whole account: one Foghorn on one chart watches all symbols. A second copy on another chart of the same terminal shows DISPLAY ONLY and takes over within about 10 seconds if the first one stops.
- Panel: status box, the actions that are on, the next 8 events (day and time, countdown, currency, impact dot, title), the symbols affected right now and the time of the last calendar update.
- Chart lines: a dashed vertical line at each upcoming event, red for high and amber for medium impact; hover for the title.
Five actions – only the alert is on by default
A new user sees the panel and gets alerts. Nothing is deleted or closed until you switch it on.
- Alert (on): 30 minutes before the window (adjustable), when it starts and when it ends. Popup on; push to the MetaTrader mobile app and sound optional.
- Delete pending orders (off): at window start, on the affected symbols, pending orders placed before the window are deleted.
- Close positions (off): at window start, all positions on the affected symbols, or only the losing ones (floating profit + swap + entry commission and fees; the closing commission is not known in advance).
- Close / delete trades opened inside the window (off): a position opened or a pending order placed during the window on an affected symbol is closed or deleted right away. On netting accounts, volume added during the window is closed again (only the added part), and a position reversed during the window is closed completely.
- Pause flag for your own EAs (off): terminal GlobalVariables FOGHORN_<login>_PAUSE, _PAUSE_<CCY>, _NEXT, _CALOK and _HEARTBEAT. A few lines of MQL5 in your EA read them before it trades (code in the manual).
Scope and safety: act on all trades, only on chosen magic numbers, or only on manual trades (magic 0); exclude symbols; at most 100 close/delete requests per day for the whole account (adjustable; the count survives re-attaching, a takeover or a restart on the same server day). Requests go through a queue with retries, pending orders first, then positions with the largest loser first. Nothing is sent into a closed market, and nothing is closed after the window has ended.
Which events and currencies count
- Impact filter: high impact only (default), or high + medium.
- Keywords (default Non-Farm, FOMC, CPI, Interest Rate): a medium-impact event with one of them in its title also counts. It is marked * on the panel.
- Exclude list (default Speaks, Speech): drops medium- and low-impact events, for example routine speeches. A high-impact event always counts, even if it matches.
- Ignored: events without an exact time (date only, tentative), holidays and worldwide events.
- Currencies AUTO (default): the chart symbol plus every symbol with an open position or pending order (within the scope). Forex pairs use base and quote (EURUSD → EUR, USD). Metals, indices and crypto use the profit currency, the base if it is a real currency, and USD (XAUUSD → XAU, USD; GER40 → EUR, USD), unless the broker gives the symbol two fiat currencies (then it is treated like a forex pair); add USD under AUTO: always watch these too if needed. You can also use a manual list instead.
A status you can trust
- CLEAR (green), NEWS IN mm:ss (window in mm:ss) (amber), NEWS WINDOW until hh:mm server (red).
- CALENDAR STALE: the last refresh failed or was incomplete, or the data is older than 60 minutes. Foghorn keeps using the last good data.
- CALENDAR UNAVAILABLE: no calendar data since the start.
- NOT CONNECTED: the terminal has been offline for more than 5 minutes.
Foghorn never shows CLEAR while the calendar is unavailable or stale or the terminal is not connected. In those states the pause flag reports CALOK = 0, so a cooperating EA never gets a false "clear".
Honest limits
- Foghorn cannot stop another EA from sending orders. MetaTrader 5 does not let one program block another program, the mobile app or a manual click before the order reaches the broker. Foghorn can only alert you, delete and close afterwards, and publish the pause flag that cooperating EAs read.
- The calendar is the one built into MT5. Its availability depends on your broker and terminal (news must be enabled under Tools → Options → Server). If there is no data, the panel says so.
- The MT5 calendar does not exist in the Strategy Tester. There Foghorn shows NO CALENDAR IN STRATEGY TESTER and does nothing.
- Netting accounts: there is one position per symbol, shared by every EA and by manual trading. Closing it affects all of them, including the part that was open before the window. Use a hedging account if several EAs trade the same symbol and you want them treated separately.
- A pending order placed before the window that fills during it becomes a new position and is closed by the "opened inside the window" action. Switch on Delete pending orders to avoid that.
- Delete and close need Algo Trading on and a running, connected terminal. A VPS is recommended.
Prop-firm news rules plus daily and max loss guard in one EA: see Prop Firm Guard Plimsoll in my products.
Risk warning: trading leveraged products carries a high risk of loss. Foghorn reduces exposure to news events only as far as the actions you switch on allow; it cannot remove the risk and does not guarantee any result.
