Discussion on MQL4 documentation - page 3

 
MQL is similar to C, no one argues with that. No one needs or has ever asked for a tutorial on MQL syntax.

In programming languages, where Framework-e and its functions, such as Java and MQL, are the main focus of documentation, because in this kind of language you can't do anything without them. This is not assembly or C, where if you don't like something or don't understand how it works, you are welcome to rewrite it however you want. In Java documentation, you will find that 90% of it concerns functions of the Framework.

The situation is very similar in MQL, because MQL is a language where standard framework functions play a major role, while the documentation on these functions is lame (and this is exactly what Triton said, and with which I absolutely agree).

The examples in the documentation are very often useless. A good example is not one line - a function call with parameters. Documentation and examples must explain very precisely what are the acceptable limits of parameters, where and how you can and where and how not to call the function, and what to expect as a result of the call.
No need any tutorials, just go through the documentation and if it does not look like OrderSend documentation, but looks like this one, correct it:

int AccountStopoutLevel()
Возвращает значение урвоня, по которому определяется состояние Stop Out.
Пример:
 
Print("StopOut level = ", AccountStopoutLevel());

At least the link from Stop Out is needed, which explains what is meant by Stop Out (same as Margin Call? It's unclear. ...). Better yet, if the example gives the specific value of the consumer account and what happens to it before and after use of the function and why. In the case of AccountStopOutLevel the example could show the consumer account which was thrown out of the trade on this level and explain the connection between this level and what AccountStopOutLevel reports.

Truth be told - there are also functions, where documentation is a pleasure to read, you can immediately see that they have been thought through and written seriously, not just to ignore (OrderSend, for example). But there are fewer such functions than those with good documentation. With OrderSend it is clear - everybody needs OrderSend, here you have to write documentation or people won't be able to trade at all. And on other functions - "well, they don't cluck and well, if necessary, we will add them later. It is necessary, Mr. MQS, it is necessary. Please add them.
 
Dmitrich:

But there are a lot of traders here, not programmers! A man likes playing the stock market, the excitement, the calculations. Why would a trader become a programmer by studying C++, and then the articles and chelers? For him it is not interesting, and it is difficult to "run in" the strategy without an Expert Advisor. What to do? Take the shortest route and look for (ask, demand, extort) a textbook. What's wrong with that? If we don't like the pies at the nearest bakery, we look for another bakery, not always trying to bake ourselves. Everyone should do their own thing and preferably what they like.

For some reason you lump together the traders' reluctance to become programmers and the need for a textbook.
These are completely different things! I'm not a programmer by education and no one required programming from me except at the institute during the learning process. However, I've simply read what I've got 2 (TWO) years ago in MQL and started gradually to program. Now I've got 260Kb EA written with my ideas, which I've never seen anywhere in the Internet, and which I'm constantly modifying (i.e. I'm searching for it).
If a trader has been successfully shoveling money in the market for 1-2 months thinking he is a real "trader", and thinking that he is lucky to have a ready working strategy - he just needs a smart textbook and will be able to sleep well once a week having programmed an Expert Advisor with a textbook, then this is an illusion that everyone has gone through! You need to treat it as just a certain step in the development of MTS. I can assure you that the algorithm that you have used to succeed in the market for 1-2 months absolutely cannot guarantee you anything in the future no matter how and by whom this EA will be implemented - the author himself or third parties for money.
 
For some reason you have lumped together traders' reluctance to become programmers and the need for a textbook. <br/ translate="no"> These are completely different things! I'm not a programmer by education and no one required programming from me other than at the institute during the learning process. Nevertheless I just took my readings of MQL 2 (TWO) years ago and gradually started to program. Now I've got a 260Kb EA I've written with my ideas, which I've never seen anywhere in the Internet, and which I'm constantly modifying (i.e. I'm searching for them).
If a trader has been successfully shoveling money in the market for 1-2 months thinking he is a real "trader", and thinking that he is lucky to have a ready working strategy - he just needs a smart textbook and will be able to sleep well once a week having programmed an Expert Advisor with a textbook, then this is an illusion that everyone has gone through! You should treat it as just a certain step in the development of MTS. I can assure you that the algorithm that you have used to succeed in the market for 1-2 months absolutely cannot guarantee you anything in the future no matter how and by whom this EA is implemented - by the author or by others for money.

I'm not talking about the success of the strategy, but about the natural desire of people to learn how to write Expert Advisors without studying textbooks on C++ and lots of articles and manuals.
 
Dmitrich:

I'm not talking about the success of the strategy, but about the natural desire of a person to learn how to write EAs without studying textbooks on C++ and lots of articles and manuals.

Generally speaking, in my understanding a normal MQL-writing textbook must be something similar to what is available in bookstores for any programming language. These thick books are half a thousand pages each. The MQL peculiarities can hardly be described in a booklet of 50-100 pages, what the "traders" are dreaming of. The listing of examples alone may easily amount to 100 or even more pages judging by articles of this site. And you also need illustrations and detailed explanations. So it is unlikely that a serious MQL textbook will strongly encourage "traders" to EA programming if the existence of this site has not inspired them so far. I speak of the need for the existence of a MQL tutorial, and I mean the formal side of the issue - if there is a programming language, then there must be a tutorial (even if primarily in electronic form) for those wishing to learn to program in it.
By the way, some local articles are almost ready chapters of a textbook.
 
solandr:
Dmitrich:

I'm not talking about a successful strategy, but about a natural desire to learn how to write Expert Advisors without studying C++ textbooks and lots of articles and manuals.

Generally speaking, in my understanding a normal MQL-writing textbook must represent something similar to what is available in bookstores for any programming language. These thick books are half a thousand pages each. The MQL peculiarities can hardly be described in a booklet of 50-100 pages, what the "traders" are dreaming of. The listing of examples alone may easily amount to 100 or even more pages judging by articles of this site. And you also need illustrations and detailed explanations. So, a serious MQL tutorial will hardly inspire "traders" to program experts if the existence of this site has not inspired them so far. I speak of the need for the existence of a MQL tutorial, and I mean the formal side of the issue - if there is a programming language, then there must be a tutorial (even if primarily in electronic form) for those wishing to learn to program in it.
By the way, some local articles are almost all ready-to-use chapters in a textbook.
I agree, but it would be easier for traders and novice programmers to use a textbook where everything is systematized. You do not have to study all 500 pages. It is enough to study the introductory part, the basics of programming, and then use it as a reference book, selecting only those operators (or whatever they are called) that are necessary to implement and optimize a particular strategy. And examples, accordingly, with illustrations will not all be needed any more. I know it is impossible to write a comprehensive textbook, but just the subtleties can be clarified here in articles and on the forum.
 
Dmitrich:
It is sufficient to learn the introductory part, the basics of programming, and then use it as a reference, selecting only those operators (or whatever they are called) that are needed to implement and optimise a particular strategy. And examples, accordingly, with illustrations, are no longer all that necessary.
Just to solve these problems, Rosh has written several basic articles on Alpari's site that are quite helpful for beginners. However, the design has changed - I cannot immediately find these articles on the site. You can read them during a week and be aware of the basic trends in programming. And then, depending on the tasks to be performed by the expert writer.
 

Why lump everything into one pile?
Why argue the obvious - that a good (and not a good) MQL textbook is a must?
I've been programming in MQL for 2 years now, I don't need any books. But does it mean that they are not needed at all?

In this thread a lot of correct comments have been made elsewhere. I will reiterate them along with my own, to bring everything together in one place:

There must be a mandatory chapter describing (as alex_ant has written) the mechanism of MQL-program operation. This is something that every trader who is new to programming can understand even before learning the language. This description must be tied in with the process of trading, and it can also explain the difference between indicators, scripts and Expert Advisors, how they behave in relation to the tick queue, to the trade server, to each other, etc.

More attention should be paid to the structure of MQL-program, its main components - the init(), start() and deinit() functions. These functions are the main difference between MQL and other languages, and the documentation gives them very little space, just a few lines.

It would be very nice to look through all the articles in the dictionary and not only to eliminate the mistakes and typos, but also to bring the terminology to a common denominator. Very often descriptions of the same or similar parameters of functions and procedures are made using quite different terms and their meaning is not explained. As a result, descriptions are available, but the meaning and use of some parameters have to be studied in an experiment.

It is very important (I absolutely agree with 4x4ever ) to give examples in a straight line! The vast majority of examples in the dictionary articles explain nothing and teach nothing. In general, a one line example is not an example ! In a normal textbook, the example allows you to understand both the meaning of parameters, and the order in which the procedure/function is used, and the result it produces. And for this it is not necessary to write your own program. IMHO: the weakness of the MQL Dictionary examples is one of the main drawbacks of the documentation.

And finally, there should be a few articles that would explain to a beginner the procedure of writing an indicator/script/advisor step by step. This need is not related to the algorithm, but to the features of the architecture of MQL-program. This article will help a beginner to understand the structure and code of the template, and thus make the most difficult first step. Subsequently, this template can be used to create all other programs of this type. And there's no problem, because Rosh of similar articles have been written in abundance. You only need to select the appropriate and significantly simplify them.

Dear developers, the listed improvements to the documentation are much less work than creating a tutorial. However, for users, these things are almost equal. You often express your dissatisfaction that both forums often have people asking the same questions. Repetitive questions can be reduced drastically. To do so, just consider the few wishes expressed in this thread in the documentation at least.

 
Yurixx:

Why lump everything into one pile?
Why argue the obvious - that a proper (not good) MQL textbook is a must?

This may be correct, but one question remains - who actually writes and publishes textbooks on programming in the world? Developers or third-party authors and publishers do this? Developers make the program and the language, writing and publishing a textbook is another business.

And what makes you think a textbook is necessary? If you personally and the three others in this thread need it, it doesn't mean anything. If there was effective demand, there would already be a supply - that's the market.

A normal textbook costs 50-100 bucks. I suggest that those who want to get a quality textbook to contribute fifty bucks. And if these fifty bucks will be enough, it will be possible to hire a decent author who for normal money will work on the textbook as a main job, not between bouts of daily bread. A normal editor will be hired, normal reviewers will be paid, and then the book will be published in normal quality.

And if there is not enough demand, then there is nothing to talk about - empty forum chatter - give me everything more and for free.
 
timbo писал (а):


This may be correct, but one question remains: who actually writes and publishes programming textbooks in the world? Do the developers do it, or are they third-party authors and publishers? Developers make the software and the language, writing and publishing a textbook is a different business.

You have to throw an idea to the publishers. It is a very specialized topic they have not got to it yet. True, if they (the publishers) get down to it, they will twist it and make so many mistakes that a built-in handbook will look like the Bible by comparison :-)
 
Yurixx:


It is mandatory to have chapters describing (as alex_ant has written) the mechanism of MQL-program operation. This is something that every trader who is new to programming can understand even before learning the language. This description must be tied in with the process of trading, and it can also explain the difference between indicators, scripts and Expert Advisors, how they behave in relation to the tick queue, to the trade server, to each other, etc.

More attention should be paid to the structure of MQL-program, its main components - the init(), start() and deinit() functions. These functions are the essential difference between MQL and other languages...

Exactly!

"- Have you noticed, sirs, what the weather is like?
- Predictable.
- Precisely predicted, Sir Oira-Oira, precisely predicted!"
(Strugatsky, Monday Begins on Saturday)
Reason: