MT4 to MT5 Port
A six-year-old MT4 grid EA rebuilt in MQL5, trading the same way on the new platform.
99.6%Of trades identical after the port
01Problem
A proven EA stuck on a platform being switched off
The client ran the same grid EA on MT4 for six years. Then her broker and her prop firm both moved to MT5 only.
She had the source code but nobody who knew it: the original developer was gone.
02Solution
The same EA on MT5, trading the same way
A rewrite in MQL5 that maps MT4's orders onto MT5's positions and deals, so the grid behaves order for order on hedging and netting accounts alike.
Every input kept its name and meaning, so her presets load as they are. Daily loss and drawdown limits were added on the way for the prop account.
03Build
From an audit to two versions that trade alike
Finished only when both versions traded the same six years the same way.
The audit
The MQL4 source read end to end: every order call and every MT4 quirk the EA relied on, written down before a line changed.
The port
MQL5 code with MT4's order model mapped onto positions and deals, cleaned up and commented.
Testing
Both versions over the same history, trade by trade.
- Six years run on MT4 and MT5, every differing trade listed
- Each difference explained or fixed before launch
- Her presets loaded and checked on the new version
04Stack
What it's built with
- MQL4The original EA
- MQL5The ported EA
- MetaTrader 4Running the old version for comparison
- MetaTrader 5Where it trades now
- PythonThe trade-by-trade comparison report
05Result
Six years of strategy, on a platform with a future
- Of trades identical after the port
- 99.6%
- Of history compared
- 6 yrs
- Presets rebuilt
- 0
The EA runs on MT5 as it did on MT4, with prop limits built in and source code she can read.
06Client review
I was ready to lose an EA that had worked for six years. The MT5 version trades the same, and for the first time I understand its code.
07Next step
Need something like this?
Custom developmentFrom $5,900
- Tell me about your strategy and what it should do
- A reply and a written plan within 24 hours
- A fixed price and timeline before any work starts