Source code
Build an EA news filter with the correct server time
A news filter needs an event time, a matching clock and a clear rule for the minutes before and after that event. A timezone mismatch can shift the filter away from the announcement it was meant to cover.
Choose the event source
Identify whether your project uses MetaTrader’s economic calendar, an imported schedule or another supported feed. Record how the chosen source represents time and how the strategy’s clock is obtained.
Map the relevant events
Define which currencies and event types matter to the symbol. A gold strategy may consider more than one category of release, but avoid silently filtering every global event if that is not the intended design.
Test the boundary minutes
Pick a known event and inspect the minute immediately before, at and after each filter boundary. Also check a broker timezone change. Log the reason for a blocked entry so the behaviour is understandable.
Keep the historical source reproducible
A historical review should use the event information available to its method, not later surprises inserted after the fact. With editable code, you can make the time conversion and filter window explicit.
Start with a free editable EA project · Explore MQLume source code
Back to top