Portfolio

Removing a DLL dependency from an expert

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

MT5 Existing EA owner Bazarkhan Development In-house development team

Project specifications

Project specifications

Market
EURUSD / XAUUSD
TF
H1
Platform
MT5
Client type
Existing EA owner
Delivery window
9 weeks
Stack
MQL5, the legacy code, function-call logs
Strategy
DLL functions rewritten in MQL5
Modules
Replacement functions + parity tests
Testing
Output compared before and after

Who this was for

Bazarkhan Development

Role
In-house development team
City
Tehran
Project reference
TBT-1407-25
Trade flow

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.

Initial challenge

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

Solution

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

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.

Safeguards and risk control

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

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

Portfolio

How the delivery ran

Every project moves through these five phases, with the window for each agreed in the specification.

  1. Discovery and problem framing

    Completed

    Listing this project's MT4/MT5 differences: orders, positions and account accounting.

    Day 2–7

  2. Written specification

    Completed

    A migration map per file and an equivalent behaviour for concepts MT5 does not have.

    Day 8–19

  3. Implementation

    Completed

    Rewriting the order layer and mapping the magic numbers without touching the strategy.

    Day 20–41

  4. Testing and validation

    Completed

    Running the same data on both builds and comparing trade by trade.

    Day 42–55

  5. Handover and support

    Completed

    Handover of the MT5 build with a difference report and the MT4 build kept intact.

    Day 56–59