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:
This is the result:
|MT4||MT5||How many times МТ5 is faster|
|Test Ackermann||2406||0||MilSek||Absolute *|
|Test Ackermann OOP||2969||0||MilSek||Absolute|
|Test Arrays OOP||7312||437||MilSek||16,73|
|Test BubbleSort OOP||4297||656||MilSek||6,55|
|Test Call OOP||906||0||MilSek||Absolute|
|Test Fibo OOP||2656||0||MilSek||Absolute|
|Test Float OOP||2516||0||MilSek||Absolute|
|Test Matrix OOP||7984||656||MilSek||12,17|
|Test Moments OOP||7266||5594||MilSek||1,30|
|Test NestedLoop OOP||6015||0||MilSek||Absolute|
|Test PiCalculate OOP||11953||3500||MilSek||3,42|
|Test QuickSort OOP||12782||1234||MilSek||10,36|
|Test Random OOP||3203||531||MilSek||6,03|
|Test Sieve OOP||18890||1094||MilSek||17,27|
|Test StrCat OOP||47||1766||MilSek||0,03|
|Test String OOP||235||453||MilSek||0,52|
|Test StrPrep OOP||5500||1938||MilSek||2,84|
|Test StrRev OOP||7125||4297||MilSek||1,66|
|Test StrSum OOP||5844||3984||MilSek||1,47|
|Test ObjectCreate OOP||46||125||MilSek||0,37|
|Test ObjectMove OOP||63||328||MilSek||0,19|
|Test ObjectDelete OOP||547||0||MilSek||Absolute|
|Test Print(Hello, world!!!)||1047||7453||MilSek||0,14|
* Absolute — absolute superiority of MetaTrader 5.
// 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 https://www.mql5.com/en/forum/68087 Author: Renat Fatkhullin // Program put together by Vladimir Pastushak https://www.mql5.com/en/users/voldemar // Main performance indicator - time. The less time calculations required, the more productive are the computer and the МetaТrader Terminal.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/14179
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.Average Directional Movement Index (ADX)
The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.