
DuoFX News Filter Library
Backtest with a news filter. Live, in the Strategy Tester and in the optimizer. MT5's built-in economic calendar isn't available in the Strategy Tester, and MT4 has no built-in calendar, so most news filters only work live. DuoFX News Filter Library compiles the high-impact US calendar into the library: the same releases live and in every backtest. Set your broker's time mode once and the news windows land on the same bars in both. For MQL5 and MQL4 developers: it has no panel and does not trade; your EA calls it.
- FOMC, CPI and Nonfarm Payrolls (NFP) on by default, plus PPI, retail sales, GDP and PCE: 574 releases from 2020 to 2027.
- Works in the Strategy Tester, visual mode and every optimizer pass. No web requests, no files, no DLLs.
- Converts New York release times to your broker's server time, through both US and EU clock changes.
- Two calls in your EA: DuoNewsInit in OnInit, DuoNewsIsBlocked before any entry.

A high impact news filter that works in backtests
The calendar lives inside the library, so backtests, visual mode and optimizer passes see the same releases as live trading. Compare your EA with and without the filter on the same history, and fast, even across thousands of optimizer passes.
Your broker's server time, both sides of every clock change
Each release is stored in New York time and converted with the US and EU daylight saving rules for every year. Time modes: NY+7 (GMT+2/+3 with US DST, the most common forex and gold server clock), EU DST, US DST with any offset, and a fixed GMT offset. The gap weeks in March and around November, when the US and Europe change clocks on different dates, are handled.
Auto mode, live only, reads the server's GMT offset and matches the weekly market opens in the chart's history against the US DST, EU DST and no-DST rules. With too little history it says so and assumes NY+7. In the Strategy Tester, set your broker's mode yourself.
Windows that match how bars work
Choose minutes before and after, for example 2 before and 5 after, or 15 and 30. Whole minutes, both ends included: 2 before and 5 after NFP at 15:30 server time blocks 15:28:00 to 15:35:59. Releases in the same minute come back as one event, such as "CPI + Retail Sales".
For prop firm traders and gold scalpers
Each prop firm has its own news rule (how many minutes, which currencies, whether open trades count). Set the window to match yours and test it in the Strategy Tester. The library covers the US releases listed here; it cannot guarantee that a trade complies with any firm's rules.
Specifications
| Platforms | MetaTrader 5 and MetaTrader 4 |
|---|---|
| Type | Library for Expert Advisors (needs coding) |
| Events | FOMC, CPI, NFP, PPI, retail sales, GDP advance, PCE (US) |
| Calendar | 574 releases, January 2020 to 31 December 2027 |
| Time modes | Auto, NY+7, EU DST, US DST, fixed GMT offset |
| Window | 0 to 1440 minutes before and after |
| Requirements | No DLLs, no web requests, no files |
| Price | US$39 |
See it on the chart





DuoFX News Filter Library: questions and answers
Does it work in the Strategy Tester and the optimizer?
Yes. The calendar is compiled in, so backtests, visual mode and optimizer passes use the same releases as live. Set your broker's time mode for backtests.
Does it work on MT4?
Yes, the MT4 version has the same functions and calendar.
Does it trade or close positions?
No. It answers questions about time; your EA decides whether to skip entries, close trades or move stops.
Is the forecast or actual number included?
No, release times only. US events only: they move gold, the US dollar pairs and US indices most.
What happens after 2027?
DuoNewsCoverageEnd() tells your EA where the calendar ends. We plan to extend it in later versions.
Where do I buy DuoFX tools?
Every DuoFX tool is sold on the official MQL5 Market. Checkout, licences and updates are handled there, and you can install straight from the Market tab inside MetaTrader.
Can I try a tool before buying?
Yes. The MQL5 Market offers a free demo of every paid product, which runs in the MetaTrader Strategy Tester.
Get DuoFX News Filter Library today.
Secure checkout, free demo and free updates through the official MQL5 Market.