For a newbie if you read mql4 book and try to code in mql5 it would be impossible, because there is much difference,
and documentation just throw random information at you that makes very hard to learn without an ordered book. If mql5 staff are reading this,
you all should really give us a book easy to understand, mql4 book if you read it you'll have a good idea how to code in mql4, but in mql5 you have
these references just help you once you understand all the concept. It explain things using information that wasn't fully explained before, for a newbie its total incomprehensible,
yet a book, it will teach only based on things it already explained, not the case here, so they created a great tool but without a good and simple manual, that's the reason mql4 will
I'm not sure what you expect from MetaQuotes. How to code from scratch?
They already have a Language Basics section in the book, which starts off with a section:
The MetaQuotes Language 5 (MQL5) is an object-oriented high-level programming language intended for writing automated trading strategies, custom technical indicators for the analysis of various financial markets. It allows not only to write a variety of expert systems, designed to operate in real time, but also create their own graphical tools to help you make trade decisions.
MQL5 is based on the concept of the popular programming language C++. As compared to MQL4, the new language now hasenumerations,structures,classesandevent handling. By increasing the number of embedded maintypes, the interaction of executable programs in MQL5 with other applications through dll is now as easy as possible. MQL5 syntax is similar to the syntax of C++, and this makes it easy to translate into it programs from modern programming languages.
To help you study the MQL5 language, all topics are grouped into the following sections:
There are many, many tutorials online to learn C++ which will teach the basics far better than a manual from MetaQuotes could.
that's the reason mql4 will remain solid
With all due respect, that is reason you want mql4 to remain solid.
I suspect coders make up a tiny proportion of users.
Given that you are from Brazil, and have difficulty with the language, consider going over to the:
I think he refferred to mq4bookenglish.chm (I cant open it anymore now). I forgot who wrote it, but it teach from the basic. Since mql4 is "unstructured" program language, a program can be made easier. But in mql5 use an OOP concept so it hard for novice (like me) to coding in MQL5. As a trader, we can only ask a coder to help, or learn hard (stop trading for the time being). :).
edited : Just found the link https://book.mql4.com/ wrote by S Kovalyov
I am aware of that book, but to the best of my knowledge it was not updated to reflect the post-Build 600 changes to MQL4.
You don't have to use OOP in MQL5... you can continue to code in MQL5 procedurally like MQL4.
Also, you can use OOP in MQL4 if you want.
I have not migrated to MQL5 yet, but I do play around with it.
From what I can tell so far, placing trades in MQL5 is different and there are some other "issues" like the absence of certain commonly-used functions like iTime, iHigh, iLow etc.
But once you get the hang of it, it really isn't that different (famous last words?!)
Yes you can code MQL5 procedurally, but several functions are binded to different terms, like enum, class, for example iIchimoku, in Mql4 is easy, in definition 4 you just put the number of the indicator buffer you want, problem solved, yet in MQL5 they
changed it and i cant understand it, so if you read just mql4 book you dont know how to do it. I know they dont have to teach anyone to code in C++, but if they want to have sucess, they should urge to create this beginner and simple tutorial. They changed
start, init, and put that oncalculate function that i just dont get all these arrays, and noone explains nothing, what i mean is that:
1- Documentation in mql5 is far away from a book, it doesnt use occam's razor, but the opposite, it try to explain things the most long and complicated ways
2- articles are good, but a book is the deal, because only in a book you have a begin and an end, structured, in a way that what you read now was previousily explained.
3- they complain mql5 inst growing, when they dont bother to teach traders how to use it in a simple way
I do understand your frustrations.
But that book is no longer an accurate representation of MQL4.
They changed start, init, and put that oncalculate function that i just dont get all these arrays, and noone explains nothing, what i mean is that:
This is how you are supposed to code in MQL4 now. All the default MT4 indicators are this way, and if you use the MetaEditor wizard it uses this format too.
The gap from old MQL4 to MQL5 is big.
The gap from new MQL4 to MQL5 is not so daunting.
It might be good to learn the updated MQL4? Then you may feel better about moving to MQL5