I was curious about the speed of mql4 compared to mql5, so I did a little test. I implemented a simple prime searching algorithm and ran in MT4 and MT5.
Code in MQL4:
For MT5 only 1 line need to be modified:
to:
Five runs in MT4:
Five runs in MT5:
You can see that the difference is HUGE: in MT4 the script needs 24 seconds, while in MT5 it only needs 9 seconds! I was very much surprised, I did not imagine so much difference in performance, but I like that. Too bad there is no live MT5 broker.
That is just the OnStart() only for scripts. Wait till you see OnTick(), OnTrade(), OnTimer(),etc, working hand in hand - you'll be amazed not just speed, but entire EA execution. also, the mt5 tester/optimization, just wow.
There are rumours going round that if you have mt4 live account and will like an mt5 live you can request for it, but you have to sign some forms. I don't know how true.
Too bad there is no live MT5 broker. There Is.
Okay, tell me!
maybe the most of time is used for file operations.
Why calculate time include file operations ?
try compare without file operation, 32 mode or 64 mode .
Here are some measured times on an i7-2600:
times with file I/O - times without file I/O
MQL4 18 sec 12 sec
MQL5 9.3 sec 4.3 sec
VB6 5.3 sec 4.9 sec
Delphi 4.1 sec 3.8 sec
Here are some measured times on an i7-2600:
times with file I/O - times without file I/O
MQL4 18 sec 12 sec
MQL5 9.3 sec 4.3 sec
VB6 5.3 sec 4.9 sec
Delphi 4.1 sec 3.8 sec
(VB).NET 14.5 sec

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I was curious about the speed of mql4 compared to mql5, so I did a little test. I implemented a simple prime searching algorithm and ran in MT4 and MT5.
Code in MQL4:
For MT5 only 1 line need to be modified:
int start() {
to:
Five runs in MT4:
Five runs in MT5:
You can see that the difference is HUGE: in MT4 the script needs 24 seconds, while in MT5 it only needs 9 seconds! I was very much surprised, I did not imagine so much difference in performance, but I like that. Too bad there is no live MT5 broker.