Somente usuários que compraram ou alugaram o produto podem deixar comentários
Dennis Muchiri Miano  

How to connect Precision News Filter to your MT4 Expert Advisor

This utility works by setting a flag that your EA reads before opening any trade. Connecting it takes two small additions to your EA's code and about 5 minutes.

Step 1 — Copy the include file

Download the companion file NewsFilter.mqh from the attachment in this comment. Place it in the following folder inside your MT4 data directory:

MQL4 / Include / NewsFilter / NewsFilter.mqh

To find your MT4 data directory: in MT4 go to File → Open Data Folder.

Step 2 — Add one line at the top of your EA

Open your EA file in MetaEditor and add this line at the very top, with your other include statements:

#include <NewsFilter/NewsFilter.mqh>

Step 3 — Add one line inside start() or OnTick()

Find the main trading function in your EA. In MT4 this is either start() for older EAs or OnTick() for newer ones. Add this as the very first line inside it, before any other logic:

if(NewsTradingBlocked(Symbol())) return;

Note: MT4 uses Symbol() as a function call rather than the _Symbol variable used in MT5.

Step 4 — Compile and verify

Press F7 in MetaEditor to compile. You should see 0 errors. If you see an error referencing NewsFilter.mqh, double check the file is in the correct folder path from Step 1.

Step 5 — Verify it is working

Attach Precision News Filter to any chart. In MT4 go to Tools → Global Variables. You should see entries like NewsBlock_EURUSD, NewsBlock_XAUUSD and so on. When a value shows 1 your EA is being blocked for that symbol. When it shows 0 trading is clear.


Important notes

The utility must be running on your MT4 instance for the block to work. If it is not attached to a chart, your EA will trade normally with no news protection. For VPS users, attach the utility to a quiet chart such as XAUUSD M15 and leave it running permanently.

MT4 does not have a built-in WebRequest function in older builds. If you see a WebRequest error on first run, go to Tools → Options → Expert Advisors, check Allow WebRequest for listed URL, and add:

https://nfs.faireconomy.media

The utility never touches your EA's logic. It only signals. If you remove the two lines above your EA returns to its original behaviour with no other changes needed.


If you need help post a comment below with your EA name and which step you are on and I will assist.

Arquivos anexados:
Dennis Muchiri Miano  

MT4 EA INTEGRATION — Download the companion file below

Download NewsFilter.mqh attached below. Place it in: MetaTrader 4/MQL4/Include/NewsFilter/NewsFilter.mqh

Step 1 — Add at the top of your EA:

#include <NewsFilter/NewsFilter.mqh>

Step 2 — Add as the first line of start() or OnTick():

if(NewsTradingBlocked(Symbol())) return;

Note: MT4 uses Symbol() not _Symbol. Compile your EA (F7). Attach the utility to any chart. Done.

Step 3 — Whitelist the feed URL:

Go to Tools → Options → Expert Advisors → Allow WebRequest. Add: https://nfs.faireconomy.media
Arquivos anexados:
Dennis Muchiri Miano  

IMPORTANT — WebRequest setup required for MT4

Unlike MT5, MetaTrader 4 requires you to manually whitelist URLs before any utility can download data. If the panel shows 'Events: 0' after attaching, this is why.

Fix in 30 seconds:

1. Go to Tools → Options → Expert Advisors

2. Check 'Allow WebRequest for listed URL'

3. Click the + button and add: https://nfs.faireconomy.media

4. Click OK. Reattach the utility. Events will load within 5 seconds
Dennis Muchiri Miano  

MT5 VERSION AVAILABLE

If you are migrating to or testing MetaTrader 5, a dedicated MT5 version of Precision News Filter is available as a separate listing. Search 'Precision News Filter' on the MQL5 marketplace or find it on my profile. Identical features, identical settings, same EA integration pattern — use _Symbol instead of Symbol() in MT5.
Somente usuários que compraram ou alugaram o produto podem deixar comentários