Self-learning the MQL5 language from scratch - page 7

 
MrBrooklin:

I agree, Valery, but the question was asked about i++ and ++i. Also got a D for that. It's not clear yet. It is so sad.

Sincerely, Vladimir.

There will be a difference if Time[++I] and Time[I++]
 

For me, all these postfix-prefix subtleties are extremely harmful not only for beginners, but even for experienced coders.

I'm convinced that if it takes more than a second to understand a line of code, it's a bad line which must be replaced (as a rule, with several simpler lines).

The code must be simple and transparent, like three kopecks. No "contrivances" with multiple references using various tricky postfixes-prefixes, no "piling up" operators in one line - all these sources are very hard to catch problems.

Therefore, for a beginner, constructions ++i and i++ can be considered equivalent (but not the same, and remember that there are subtleties that distinguish them).


For learning, specific information sources do not matter, no matter old C++ bibliography (even "C by K & R" will do), or new ones, or even forum, or standard help. Much more important is to code and debug what you've written. It is a walker who makes the road.


And it's very important to MAKE A USEABLE RESULT. This, I think, is something that a lot of people - both students and teachers - forget.

Don't jump straight into writing an advisor for a "cool cool strategy" - it won't work right away anyway. You have to set a very small FUN and useful task, and accomplish it. Well, say, write an "Expert Advisor" that would produce a sound, if the symbol price reaches a certain level. Such expert placed in a "background graph" will allow "not to miss" price's approach to an important level on this graph. Writing it is an easy task even for a beginner, and, what is equally important, it can be used.

The next task can be a bit more complicated (say, the same Expert Advisor should not only sound when the price approaches a level, but it should only approach the level going down (or up). Further on, the task will become even more difficult.

What matters here is exactly the usefulness of what the encoder is writing and the encoding itself. The source of information is unimportant.

 
Aleksei Beliakov:
There will be a difference if Time[++I] and Time[I++]

yes, leave this mysterious, and incredibly frightening incident only in your mind

 

Do you want to join in on the chorus?))

  1. First, learn a programming language. And yes, the difference between I++ and ++i (and not only that) - it's the basics, without which you can't do anything more complicated than open an indicator crossing. And yes, the reference does not show (actually it does, but in vague and allegorical language), but the great and terrible undefuned behavior (UB) is also with us)))
  2. After that the API of the terminal (it's all SymbolInfo..., Order..., etc.) comes to us.

You can combine them, but always remember, that the first is the base.

What's my point? Help is help. They tried to make it with elements of a textbook, but, the main thing in that phrase - they tried. If there is a textbook on mql (Kuznetsov's about another mql - straight to the bottom), then go ahead and up. But if there is no such, then C++, keeping in mind that many things (pointers, reference returns, transfer semantics, etc.) are not there at all.

And yes, forum for learning is evil. They will give you so much advice (including the one I gave you in the muddy terms). To learn the language from other people's ...codes from kodobase is nothing but... (well, there is a layer of bdsm lovers, of course).

PS. Read the docs, chew the tutorials, write tests (check the operation of places you don't understand with test scripts), and you'll understand there. If it'll drag you in, you're welcome, if it'll be a drag, then it's not yours.

PPS. Less help me on forums. Working solutions of course naked, but that's why and how, not the fact that explain. At output it is that Lago of crutches fastened by not clear substance can turn out.

 

Vladimir Simakov, the mysterious assistant,

surprised by his quick response when a bar search was needed

 
I would first ask myself: What do I need this language for?
 

Self-training in MQL is the same as self-training in any skill, whether it is a foreign language or the guitar, you read + bloody fingers on the fingerboard and strings = results

Simply read - imho does not work, I think that not in vain in high schools is always recitation theory then practice, ie without the practical knocking on the keyboard to "crust anything will not go down

ZS: Helpmi works, but provided that there is at least some basis, otherwise it's do_for_me )))

 
Roman:

You really need to start with the basics of C or C++. Not from the articles of this forum.

Good day all!

Roman, I've watched the video at the link https://www.youtube.com/watch?v=CJm6o82Vu2g&feature=emb_logo. It is a good video for beginners. The author showed me the principles of the video chapter, from "beginning" to "end". I am looking at other lessons of this author with nickname #SimpleCode . Thank you for the link!

Regards, Vladimir.

 
Vladimir Baskakov:
I would first ask myself: Why do I need this language?

Hello, Vladimir!

You have asked, so far, the most important question in this thread. I consider self-education (self-education), one of the stages of self-development, i.e. enriching my knowledge by searching for the information I need. After graduation I practically constantly self-educate in different spheres of activity. MQL5 programming language is one more step, which I hope to master, and if I succeed, I will share my knowledge with those who start programming from scratch, presenting it in an easy-to-understand manner.

Regards, Vladimir.

 
MrBrooklin:
ek

Hello Vladimir!

You have asked, so far, the most important question in this topic. I consider self-education (self-education), one of the stages of self-development, i.e. enrichment of my knowledge by searching for the information I need. After graduation I practically constantly self-educate in different spheres of activity. MQL5 programming language is one more step, which I hope to master, and if I succeed, I will share my knowledge with those who start programming from scratch, presenting it in an easy-to-understand manner.

Regards, Vladimir.

Good intentions. I think so, if there is no 100% strategy, it's not worth wasting your time. The most beautiful code, but draining the account, is useless. If you have a strategy, just freelance and that's it.
Reason: