I often wondered and asked questions on the forum: “Which computer to choose for maximum performance of the MetaTrader 4 and MetaTrader 5 Terminals?” This question is interesting to many at the time of an upgrade or a purchase of a new PC with a focus on the performance of the MetaTrader, which is better to buy? Intel-based or AMD? How many and what kind of RAM should there be? Which motherboard? Which drive to select for data storage: SSD or HDD ?
Developers praise the performance and super speeds of the ÐœetaТrader 5 Terminal, but how does a usual trader or an amateur programmer check the developers’ words himself? Write some code? But which? What to check with? How to compare the performances of ÐœetaТrader 4 and ÐœetaТrader 5 at all?
Anyway, I thought about it for a while and decided to write a tester script to check the performance of the PC and the MetaTrader 4 and MetaTrader 5 terminals.
Part of the code is taken from the Testing the new MQL5 compiler for x64 platforms – speed up calculations from 2 to 10 times! topic.
All I did was combine the codes of all the tests into a single script and add all these codes via a class, i.e. the script tests the PC and the terminals in two types of programming: procedural and OOP. I also added a few tests related to rendering of graphical objects, their displacement and deletion, plus handling CCanvas class test, plus the measurement of CopyRates function operation speed when copying 1 000 000 minute bars. 45 tests in total.
Additionally, honesty of VPS and VDS hosters can be checked using the script (by comparing performance on test periods).
You are welcome to take part in testing your PC by my example. I ran this test on my PC at maximum performance with empty startup.
The principle of operation of the script: once started, the script runs tests step by step, creates and deletes everything needed for the test, and finally opens a results table by itself.
My work PC:
- OS name:Â Â Â Â Windows 10 Pro
- Type:Â Â Â Â Â Â Â Â Â Â Computer based on x64
- CPU: AMD Phenom(tm) II X6 1100T Processor, 3311 MHz, cores: 6, logical processors: 6
- RAM:         8,00 ГБ
- Drive:Â Â Â Â Â Â Â Â SSD Model OCZ-AGILITY3 90 GB
This is the result:
MT4 | MT5 | How many times МТ5 is faster | ||
---|---|---|---|---|
===TERMINAL INFO=== | 0 | 0 | ||
TERMINAL_BUILD | 902 | 1210 | Build | |
TERMINAL_CPU_CORES | 6 | 6 | Cores | |
TERMINAL_DISK_SPACE | 14228 | 14134 | Mb | |
TERMINAL_MEMORY_PHYSICAL | 8107 | 8107 | Mb | |
TERMINAL_MEMORY_TOTAL | 4095 | 16214 | Mb | |
TERMINAL_MEMORY_AVAILABLE | 3737 | 0 | Mb | |
TERMINAL_MEMORY_USED | 358 | 33245 | Mb | |
===TEST=== | 0 | 0 | ||
Test Ackermann | 2406 | 0 | MilSek | Absolute * |
Test Ackermann OOP | 2969 | 0 | MilSek | Absolute |
Test Arrays | 21422 | 297 | MilSek | 72,13 |
Test Arrays OOP | 7312 | 437 | MilSek | 16,73 |
Test BubbleSort | 13422 | 672 | MilSek | 19,97 |
Test BubbleSort OOP | 4297 | 656 | MilSek | 6,55 |
Test Call | 969 | 0 | MilSek | Absolute |
Test Call OOP | 906 | 0 | MilSek | Absolute |
Test Fibo | 2594 | 0 | MilSek | Absolute |
Test Fibo OOP | 2656 | 0 | MilSek | Absolute |
Test Float | 2359 | 0 | MilSek | Absolute |
Test Float OOP | 2516 | 0 | MilSek | Absolute |
Test Matrix | 20969 | 672 | MilSek | 31,20 |
Test Matrix OOP | 7984 | 656 | MilSek | 12,17 |
Test Moments | 7578 | 5578 | MilSek | 1,36 |
Test Moments OOP | 7266 | 5594 | MilSek | 1,30 |
Test NestedLoop | 5672 | 0 | MilSek | Absolute |
Test NestedLoop OOP | 6015 | 0 | MilSek | Absolute |
Test PiCalculate | 12000 | 3515 | MilSek | 3,41 |
Test PiCalculate OOP | 11953 | 3500 | MilSek | 3,42 |
Test QuickSort | 11734 | 2110 | MilSek | 5,56 |
Test QuickSort OOP | 12782 | 1234 | MilSek | 10,36 |
Test Random | 3297 | 516 | MilSek | 6,39 |
Test Random OOP | 3203 | 531 | MilSek | 6,03 |
Test Sieve | 18828 | 1078 | MilSek | 17,47 |
Test Sieve OOP | 18890 | 1094 | MilSek | 17,27 |
Test StrCat | 47 | 1578 | MilSek | 0,03 |
Test StrCat OOP | 47 | 1766 | MilSek | 0,03 |
Test String | 250 | 437 | MilSek | 0,57 |
Test String OOP | 235 | 453 | MilSek | 0,52 |
Test StrPrep | 5406 | 1922 | MilSek | 2,81 |
Test StrPrep OOP | 5500 | 1938 | MilSek | 2,84 |
Test StrRev | 6719 | 4265 | MilSek | 1,58 |
Test StrRev OOP | 7125 | 4297 | MilSek | 1,66 |
Test StrSum | 5843 | 3922 | MilSek | 1,49 |
Test StrSum OOP | 5844 | 3984 | MilSek | 1,47 |
Test ObjectCreate | 63 | 157 | MilSek | 0,40 |
Test ObjectMove | 46 | 343 | MilSek | 0,13 |
Test ObjectDelete | 579 | 0 | MilSek | Absolute |
Test ObjectCreate OOP | 46 | 125 | MilSek | 0,37 |
Test ObjectMove OOP | 63 | 328 | MilSek | 0,19 |
Test ObjectDelete OOP | 547 | 0 | MilSek | Absolute |
Test CopyRates | 94 | 0 | MilSek | Absolute |
Test Canvas | 30078 | 28047 | MilSek | 1,07 |
Test Print(Hello, world!!!) | 1047 | 7453 | MilSek | 0,14 |
Test Final | 281594 | 89609 | MilSek | 3,14 |
Â
* Absolute — absolute superiority of MetaTrader 5.
Version for МetaТrader 4
// Important!!! It is not recommended to make changes to the script without understanding the consequences. // The script is designed to evaluate the performance of the computer (Tablet, Desktop/Stationary, VPS/VDS servers, Servers). // The script evaluated the computer in 45 tests of different focus in the two types of programming: OOP and procedural. // Part of the codes was taken from open sources Author: Renat Fatkhullin // Program put together by Vladimir Pastushak    // Main performance indicator - time. The less time calculations required, the more productive are the computer and the МetaТrader Terminal.