Case studies

Case study: News and session filter panel

Unwanted entries in the minutes around rate announcements were the single biggest drag on the results.

  • EURUSD / XAUUSDMarket
  • M5TF
  • MT5Platform
  • 5 weeksDelivery window
  • 5Deliverables
Backtest and forward test method

The client's idea

Negar Bayat works EURUSD / XAUUSD on M5; the opening brief was: Do not force-close my trades on news — just stop the bot opening anything in that window.

Project and starting point

Unwanted entries in the minutes around rate announcements were the single biggest drag on the results.

Solution architecture

A calendar panel that reads the news windows from the calendar file, blocks new entries inside them, and shows the system state on the chart.

The calendar file is refreshed weekly so the filter works independently of the terminal's internet feed. It matches how EURUSD / XAUUSD is actually traded and can be tested against the data already available.

Why this design

The calendar file is refreshed weekly so the filter works independently of the terminal's internet feed. It matches how EURUSD / XAUUSD is actually traded and can be tested against the data already available.

Implemented capabilities

Modules and components built: Time pause + live status.

Delivered output:
News and session filter panel — EURUSD / XAUUSD (M5)
Specification document and the rule-to-code mapping table
Full MQL5 source, commented
Test report: One year of news-window data
Parameter document and install guide (5 weeks)

Safeguards and risk control

New code lives in pure functions without hidden global state, and order-execution errors are caught and logged.

Backtest and forward test method

Test method: One year of news-window data.

Testing runs in three stages: a backtest on historical data, limited optimisation inside the contract's scope, and a forward run with the parameters frozen.

Tools and stack: MQL5, CSV calendar file, on-chart panel.

Every figure from this project is published together with its measurement conditions: the data window, the tick model, the spread, the commission and the build of the executable. Without them a number cannot be compared with anything.

Publishable results

Across a year of data, entries inside news windows dropped to zero, and the status panel made it obvious whether the system was active or paused.

Limitations and cautions

New code lives in pure functions without hidden global state, and order-execution errors are caught and logged.

Every test result depends on the quality of the historical data, the broker's spread and market conditions, and none of it is a promise about the future. Through a severe price gap or a broker disconnection a stop loss cannot be guaranteed, so behaviour in those conditions must be reviewed separately.

Our next-step proposal

The next step is automated tests over the calculation functions and documentation of the internal API.

Portfolio

Measured results

These are the figures the test produced — not a promise about future performance.

  • 20 min Pause around news releases
  • 3 Sessions controlled
  • 14 Configurable inputs
  • 99.9 % Runtime stability in test