Portfolio

MT4 to MT5 expert portfolio migration

A migration map per file, the order layer rewritten for MT5's position model, magic numbers reorganized, and both builds compared on identical data.

MT4 / MT5 Existing EA owner ParsFund Investment Portfolio management team

Project specifications

Project specifications

Market
EURUSD / GBPUSD
TF
M15
Platform
MT4 / MT5
Client type
Existing EA owner
Delivery window
10 weeks
Stack
MQL4 and MQL5, a Python comparison script, logs from both builds
Strategy
Order layer rewrite + magic number mapping
Modules
Shared basket + order management
Testing
Trade-by-trade comparison of both builds

Who this was for

ParsFund Investment

Role
Portfolio management team
City
Tehran
Project reference
TBT-1403-08
Trade flow

The client's idea

ParsFund Investment works EURUSD / GBPUSD on M15; the opening brief was: Bring three legacy experts and their shared basket logic to MT5 — without changing the outcome.

Initial challenge

Three MT4 experts sharing one basket logic, overlapping orders and tangled magic numbers — migrating without a map would have changed the results.

Solution

A migration map per file, the order layer rewritten for MT5's position model, magic numbers reorganized, and both builds compared on identical data.

Why this design

The strategy logic was untouched: only the layer that talks to the server was rewritten. It matches how EURUSD / GBPUSD 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.

  • 98 % Parity with the previous build
  • 2 Symbols covered
  • 3 Regressions caught
  • 1.2 M Bars in the test set

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–6

  2. Written specification

    Completed

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

    Day 7–17

  3. Implementation

    Completed

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

    Day 18–43

  4. Testing and validation

    Completed

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

    Day 44–59

  5. Handover and support

    Completed

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

    Day 60–63