News Guard Slippage Shield
- Utilitários
- Versão: 1.0
- Ativações: 20
Overview
This Expert Advisor is a protective utility for MetaTrader 5 accounts. It pauses trading around high-impact news releases and automatically closes any position that fills with excessive slippage. It runs at account level, so it can protect every Expert Advisor and Magic Number on the same account, not only trades it opens itself.
The EA does not place any trades of its own. It is designed to run alongside your existing trading robots as a risk-control layer.
Key Features
News Guard
- Pauses or resumes your all EAs automatically
- Protects your capital: helps avoid News extra orders.
- Reduces drawdown risk: your EAs do not fight News.
- Works automatically:
- Reads the economic calendar from your broker's MT5 terminal, with an automatic fallback to ForexFactory if the broker calendar is unavailable or disabled
- Closes open positions and cancels pending orders ahead of selected high/medium-impact news releases, and keeps trading paused for a configurable window before and after the release
- Automatically extends the pause window if another qualifying news event follows shortly after ("trailing")
- Filters by currency, so you only pause around news relevant to the symbols you trade
- Weekend Gap Guard: optionally closes trading ahead of the Friday market close and reopens it after the Monday open, on a fixed schedule (Thailand time, GMT+7)
- Manual Pause / Resume buttons on the on-chart panel, for manual control at any time
Slippage Filter
- Monitors every Buy Stop / Sell Stop order on the account as it triggers
- If the actual fill price deviates from the original pending price by more than a threshold you define per symbol (for example, no more than $1.0 on XAUUSD), the resulting position is closed immediately and automatically
- Works independently of the News Guard feature and can be used on its own
- Covers every EA/Magic Number on the account by default (configurable to a single Magic Number instead)
On-chart Panel
- Live status display: current News Guard status (Idle / Clearing / Paused / Resumed), Algo Trading state, active news source, Slippage Filter status and last cut details
- Today's and tomorrow's relevant news events, shown separately
- Updates every second
Telegram Notifications
- Optional alerts for every stage: EA start/stop, news pause/resume, positions cleared, close failures, slippage cuts, manual overrides
- Requires your own Telegram bot token and chat ID (not provided)
Key Inputs
News Filter
| Input | Default | Description |
|---|---|---|
| InpCurrencies | USD,EUR,GBP | Currencies to watch, comma-separated |
| InpHighImpact | true | Block trading around High-impact (red) news |
| InpMediumImpact | true | Block trading around Medium-impact (orange) news |
| InpMinutesBefore | 10 | Minutes before release to start the pause |
| InpMinutesAfter | 10 | Minutes after release to end the pause |
| InpCalendarDaysAhead | 2 | How many days of news to fetch ahead |
Weekend Gap Guard
| Input | Default | Description |
|---|---|---|
| InpEnableWeekendGuard | true | Close trading before Friday close, reopen after Monday open |
| InpWeekendCloseHourThai | 23 | Friday close hour (0-23, fixed GMT+7) |
| InpWeekendOpenHourThai | 6 | Monday reopen hour (0-23, fixed GMT+7) |
News Source
| Input | Default | Description |
|---|---|---|
| InpUseBrokerCalendar | false | Use the broker's own MT5 calendar |
| InpUseFFBackup | true | Use ForexFactory as backup (or primary, if the broker calendar is off) |
| InpFFRefreshMins | 30 | How often to refresh the ForexFactory feed |
Telegram Notification
| Input | Default | Description |
|---|---|---|
| InpTelegramEnable | true | Turn Telegram alerts on/off |
| InpBotToken | (empty) | Your own Telegram bot token |
| InpChatID | (empty) | Your own Telegram chat ID |
Position Management
| Input | Default | Description |
|---|---|---|
| InpEnableClosePositions | true | Auto-close positions/pending orders during a news pause |
| InpCloseAllSymbols | true | true = whole account, false = this chart's symbol only |
| InpMagicFilter | 0 | 0 = all Magic Numbers |
Slippage Filter
| Input | Default | Description |
|---|---|---|
| InpEnableSlippageFilter | true | Turn the Slippage Filter on/off |
| InpSlippageMaxPerSymbol | XAUUSD:1.5 | Per-symbol max slippage, e.g. XAUUSD:1.0,EURUSD:0.0005 |
| InpSlippageMaxDefault | 0 | Threshold for symbols not listed above (0 = not filtered) |
| InpSlippageOnlyStopOrders | true | true = Stop orders only, false = Stop + Limit orders |
| InpSlippageFilterAllEAs | true | true = covers every EA/Magic on the account |
UI Panel
| Input | Default | Description |
|---|---|---|
| InpShowPanel | true | Show/hide the on-chart panel |
| InpPanelX / InpPanelY | 20 / 20 | Panel position on the chart |
Requirements
This EA uses WebRequest() for two optional features - Telegram alerts and the ForexFactory news fallback. No account, license, or trading logic depends on either of these; if you don't enable them, the EA still works normally.
To use these features, add the following addresses under Tools → Options → Expert Advisors → Allow WebRequest for listed URL:
https://api.telegram.org
https://nfs.faireconomy.media
https://nfs.faireconomy.media/ff_calendar_thisweek.json
Recommended account type: Hedging.
Notes
- This EA is a risk-management tool, not a signal generator or profit system. It does not predict price direction and makes no promises about trading results.
- Always test on a demo account first with your own EAs and settings before using on a live account.
- Past behavior of the news calendar/filter logic does not guarantee future results, since it depends on the accuracy and timing of the underlying calendar data source.
Support
For questions or setup help, feel free to contact via the details in the product's contact inputs, or through a comment on this product page.
