The new forex trading platform MetaTrader 5 is in development for almost 1 year. A new language for programming of indicators, expert advisors and trading strategies, MQL5, has been written, too. Stanislav Starikov, the leading developer of the language, tells in his interview about special features of MQL5 and about how it differs from MQL4:

Interview with Stanislav Starikov, leading programmer of MQL4/MQL5:

Q: Stanislav, there are several topics in forums about the development of a new platform MetaTrader 5 and the MQL5. Could you, please, tell us about this?

A: Really, the development of the new trading platform is in full swing. And MQL5 development is its closing stage. And like the previous time with MQL4, we are going to release the development environment MQL5 earlier than the client terminal, so that traders can get acquainted with all new possibilities of our language.

Q: And what are its new possibilities?

A: First of all, it includes new data types, a new structure, classes and, in this respect, the object-oriented programming. We also introduced projects and considerably increased the program execution speed.

Q: Please, tell us about the new data type. What for are they introduced in MQL5?

A: In MQL4 we had three main data types: INT, DOUBLE and STRING. Now we have added new types: CHAR, SHORT, LONG, FLOAT, STRINGS became Unicode. We also added STRUCTURES and CLASSES. What for are we doing this? In programming languages like C++ such data types already exist. And now it is much easier to transfer source codes written in C++ into our MQL5.

For example, the winner of the championship 2007 (Better) told in his interview that he developed his EA in C++ and after debugging it he transferred the code into MQL4. Now all this will be much easier to do. Besides, already in MQL4 we included the possibility of using Windows API functions or functions from other DLL’s. Very often such functions may be of these structure types. And now we made such calls easier, meaning, we made working with MQL5 easier.

Q: What are CLASSES and Object-oriented programming?

A: A CLASS is the same STRUCTURE, but with added functions for processing data of this STRUCTURE. It allows hiding functionality, i.e. all these FUNCTIONS inside a CLASS; And a program now can be constructed out of CLASS OBJECTS like out of bricks. First of all, it simplifies programming, i.e. it becomes easier to write such programs, to read such programs and to modify such programs in the future. And consider the situation when Programs become larger and larger. In this situation CLASSES will be of great help.

Q: Could you please tell us about PROJECTS?

A: As I have already said, programs are becoming more and more complicated. In this respect, it is reasonable to divide a source text into several files. For example, one file for each CLASS. PROJECTS introduced into MQL5 allow assembling a ready program out of these files. This is also a great help in writing a program.

Q: Stanislav, you have said that you increased MQL5 program execution speed. How did you manage to do this? Well, in MQL4 the speed was rather high.

A: Tell you the truth, we had reserves. Actually, in MQL4 a compiler gets an interpretable byte code. In MQL5 we also get a byte code, but like in >NET during the code uploading, this byte code is transformed into a native x86 code, i.e. processor commands. So as a result, the program in a native language works much faster than any byte code. Moreover, we invested much time and effort into the question of code optimization. Thus we managed to speed up the program execution.

Q: Can you tell how much higher the program execution speed will be in MQL5 as compared to that in MQL4?

A: No, I can’t tell this right now, because we haven’t conducted objective tests yet. But I can tell for sure, that the speed will be several times higher. Well, wait for news.

You can watch the interview and ask questions to Stanislav here.

7 comments

Unknown said... @ June 11, 2009 at 3:26 PM

Will there be a facility built in to manually place orders in Tester and track the results similar to vhands, or autograf (with history).
Alternatively, Terminal Functions could be made available in Tester, but with say some of the Tabs opened at the same time i.e Tester Settings Details Window, Tester Trade details Windows Details and Tester Account History Window

Unknown said... @ June 13, 2009 at 4:23 AM

Will MT5 automatically replace MT4 or both terminals will work in parallel?

miranon said... @ June 16, 2009 at 6:20 AM

idanes, both terminal will work in parallel, the brokers will decide which one to use.

Anonymous said... @ July 15, 2009 at 2:52 PM

I would like to really see how the security will be, as MT4 the code is easy to decompile.

Anonymous said... @ October 23, 2009 at 4:25 PM

Russian forum MQL5 here: http://mql5.me/forum

miranon said... @ October 23, 2009 at 4:41 PM

glavforex, thanks for the link, i will check it out.

Michael A. said... @ October 26, 2009 at 1:32 AM

Is what I read about MQL5 true?

Post a Comment