Self-learning the MQL5 language from scratch - page 68

 
MrBrooklin:

If the MQL5 programming language handbook had written it like this straight away:

then there wouldn't be so many unnecessary questions. At least, beginners would have fewer questions.

Regards, Vladimir.

For some reason, it's believed that a manual is not a textbook and people already know the language, while the manual is a reminder.)

 
Valeriy Yastremskiy:

For some reason, it is assumed that the handbook is not a textbook, and the person already knows the language, and the handbook is a reminder.)

First you need to understand how, why and why, and then look in the handbook to clarify the "spelling")

 
Valeriy Yastremskiy:

For some reason, it is believed that a manual is not a textbook, and a person already knows the language, while a manual is a reminder. that's why the wording is sometimes abbreviated and loses its meaning)))

Yes, Valery, it made sense to me when I just started studying MQL5.

Regards, Vladimir.

 
Valeriy Yastremskiy:

For some reason, it is assumed that a reference book is not a textbook, and a person already knows the language, while a reference book is a reminder.)

that's probably correct, if we assume that the reference must be taught, then the next step is ..... maybe teach oral arithmetic? or even how to read an ABC? )))

MQL help is very detailed. i have some complaints about examples in help - some examples sometimes don't work and some examples on the subject of interest may be in very unexpected places, but nevertheless the examples of MQL usage are in the help, it's very cool


ZS: I don't see the point in recommending to read any book about C++. If the author has a desire to learn MQL, he will come to this by himself, but it's still necessary to read some basics about C.... Alternatively, find a children's programming book, it will speed up the process.

 
Igor Makanu:

It's probably right, assuming that the certificate is obligatory to teach, then the next stage is ..... well maybe teaching oral numeracy? or reading an alphabet in general? )))

MQL help is very detailed. i have some complaints about examples in help - some examples sometimes don't work and some examples on the subject of interest may be in very unexpected places, but nevertheless the examples of MQL usage are in the help, it's very cool


ZS: I don't see the point in recommending to read any book about C++. If the author has a desire to learn MQL, he will come to this by himself, but it's still necessary to read some basics about C.... Alternatively, find a children's book on programming, it will speed up the process.

Handbook is not a textbook, and TC as an electronic engineer, I'm sure, knows it)

Yes it is a normal reference. In addition you can always ask.

As a children's book Kovalev just). Tasks about a farm with sheep and linear growth are very good)

 
Igor Makanu:

It's probably right, assuming that the certificate is obligatory to teach, then the next stage is ..... well maybe teaching oral numeracy? or reading an alphabet in general? )))

MQL help is very detailed. i have some complaints about examples in help - some examples sometimes don't work and some examples on the subject of interest may be in very unexpected places, but nevertheless the examples of MQL usage are in the help, it's very cool


ZS: I don't see the point in recommending to read any book about C++. If the author has a desire to learn MQL, he will come to this by himself, but it's still necessary to read some basics about C.... an option is to find a children's book on programming, it will speed up the process

Hello Igor!

You are right about the fact that the Handbook should not explain everything to the end. There are primers and textbooks for that.It's written on the very first page of the Handbook that MQL5 is the programming languageclose to C++ bysyntax. Most likely, you will have to learn C++ as well. But not all at once.

Best regards, Vladimir.

 
MrBrooklin:

Hello Igor!

You are right about the Handbook not having to spell everything out. That's what primers and textbooks are for. The fact that MQL5 programming languageis similar insyntax to С++ is written on the very first page of the Handbook. Most likely, you will have to learn C++ as well. But not all at once.

Regards, Vladimir.

No, C++ is a sequel to C

C has much less linguistic constructions but they are basic, the C language itself consists of 2 dozens of reserved words (commands if, for...) and several types of variables double, int....

Reading a little book (or online material) will help you understand C syntax, otherwise you will spend days trying to figure out what for statement does from the forum

imho, it's more effective to spend 2 days reading a little book (online material) which will help you understand MQL syntax in a logical order


UPD: tried googling C for kids or C for beginners..... very few results, probably better search C++ for beginners, search engine results are good - and just ignore (skip chapters) where they start talking about classes or OOP, you will spend less time, but will essentially get C material

 
Valeriy Yastremskiy:

A handbook is not a textbook, and TC as an electronic engineer I'm sure knows that)...

Yes, Valery, as an electronic engineer I certainly know what a reference book is. But the thing is that in Soviet times the reference books I used had, on the contrary, such redundant information, which not every textbook would be able to find.

Sincerely, Vladimir.

 
Igor Makanu:

no, C++ is a continuation of C

C has much fewer language constructs, but they are basic, the C language itself consists of 2 dozens of reserved words (commands if, for...) and several types of variables double, int....

Reading a little book (or online material) will help you understand C syntax, otherwise you will spend days trying to figure out what for statement does from the forum

imho, it's more effective to spend 2 days reading a little book (online material) which will help you understand MQL syntax in a logical order

UPD: tried googling C for kids or C for beginners..... very few results, probably better search C++ for beginners, search engine results are good - and just ignore (skip chapters) where they start talking about classes or OOP, you will spend less time, but will basically get C material

Well done, Igor! I will definitely look for it.

Sincerely, Vladimir.

 

Igor Makanu:

... I don't see the point in recommending to read any book on C++. If the author's desire to learn MQL will not disappear, he will come to it himself, but it is still necessary to read some basics of C.... Alternatively, find a children's book on programming, it may speed up the process.

I want to learn MQL5, I've never lost the feeling of studying it, on the contrary, it just intensifies. I am torn, why I'm so dumb and cannot understand simple things with this loop operator. The main thing is that without the loop operator the code works perfectly, but with the loop it is a complete mess. I will get to the bottom of this anyway. However I've got much less time for self-study since the quarantine period is over and I've got rare moments to study the language at work. Mostly I study the language in the evening and late at night.

I need to solve 2 tasks to finally get down to writing the Trailing Stop code:

  1. I need to write a code with the use of the for loop operator to search all open positions for all symbols, and if there are none, then open a Buy position between 09:00:00 and 09:01:00, and close it by force at 23:50:00, if during the trading day a stop loss did not trigger. Without the for loop operator, as I wrote before, everything works perfectly. Now I want to achieve the same result, but with using loop.
  2. Write 2 functions that determine the direction of position opening by the first tick that appears in the time frame from 09:00:00 to 09:01:00. If the first tick is upwards, a Buy position should open; if the first tick is downwards, the Sell position should open accordingly. It's not a strategy, it's just my "want" not to use the random condition.
Sincerely, Vladimir.