Case studies

Case study: Removing a DLL dependency from an expert

The DLL could not run on the new server, and there was no documentation of its internal logic.

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

The client's idea

Bazarkhan Development works EURUSD / XAUUSD on H1; the opening brief was: The expert depends on an old DLL that no longer runs on our new server — do the same job inside the code.

Project and starting point

The DLL could not run on the new server, and there was no documentation of its internal logic.

Solution architecture

The library's logic was reconstructed from observed behaviour, replacement functions implemented in MQL5, and each function's output compared before and after.

Each replacement function has a parity test so removing the dependency cannot change results. It matches how EURUSD / XAUUSD is actually traded and can be tested against the data already available.

Why this design

Each replacement function has a parity test so removing the dependency cannot change results. It matches how EURUSD / XAUUSD is actually traded and can be tested against the data already available.

Implemented capabilities

Modules and components built: Replacement functions + parity tests.

Delivered output:
Removing a DLL dependency from an expert — EURUSD / XAUUSD (H1)
Specification document and the rule-to-code mapping table
Full MQL5 source, commented
Test report: Output compared before and after
Parameter document and install guide (9 weeks)

Safeguards and risk control

The old build is not removed from the live account until the MT5 results match it.

Backtest and forward test method

Test method: Output compared before and after.

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, the legacy code, function-call logs.

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

The expert now runs on the new server with no external file, and the function parity results are documented.

Limitations and cautions

The old build is not removed from the live account until the MT5 results match it.

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 reviewing behaviour under missing data and server reconnects.

Portfolio

Measured results

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

  • 99 % Parity with the previous build
  • 2 Regressions caught
  • 70 ms Order round-trip time
  • 10 scenarios Scenario test coverage