I teach from scratch, as well as help newcomers to join the ranks of MQL4 professionals. - page 5

 
Andrey F. Zelinsky:

the error in your code (highlighted in red squares) -- in general, something is wrong, it is not clear why ii is looped.

And then there are flaws in the code - in short, if we are talking about mql, then there are features of the language that you don't take into account in your code

"A keen falcon"... Well done Andryusha - you've seen it through. You should have found such an ERROR.

But if you were more attentive, you'd understand that this "i" does not refer to "ii".

So you can take back your red squares...)))

 
Alexey Kozitsyn:

It's good that you don't get off the hook, I hope you will, but, well, things happen...

I absolutely agree, but there are very good works on programming. You won't find such code there.

As for variables, I think their names are not very informative. For instance, pBuy and sBuy. You cannot tell by the name what the variable is responsible for and what its type is. And there are no comments...

Yes, I think you don't program long...

As for large projects - 10 thousand or more.

If you think that 10 thousand lines of code is a large project, you are deeply mistaken.

If I dealt with this code in 1400 lines, it would be 14 thousand (at least).

I've shown you a single project - there were larger ones too. At least I haven't seen such tasks that I couldn't complete...

And about variables - I have my own classification of prefixes and suffixes: "p" always replaces "price", "s" replaces "size".

Well, no comments only on this little piece, as everything is clear here... )))

 
Dmitry Sumsky:

Slava, I already told you, anyone can be taught how to program. Mathematics is not mainly needed for programming, but for drafting the ToR. A programmer is just a translator from the human language to the language understood by the program. If you could at least understand how a program is built, at least you would have learned to draft the ToR. If you think that the programmer is someone who prepares your technical requirements, and then uses these requirements to program, you are deeply mistaken ...))

I agree, you need combinatorial thinking and the ability to describe any process in writing. Have taught programming to ~200 people since 2010, noticed if a person can clearly describe in writing how he spent his day, he is guaranteed to learn to program.

And now guess this student will be able to become a programmer or not? ))

why

 
Dmitry Sumsky:

... But if you had been more attentive, you might have realised that ...

You're just a professional.

 
Alexey Volchanskiy:

Now guess whether or not this student will make it as a programmer? ))

why

This one will succeed.
 
Yuriy Asaulenko:
This one's sure to do the trick.
Yes, he will. I have one such "perpetual student" - can only write from dictation... )))
 
Dmitry Sumsky:

"The Eagle-eyed Falcon"... Well done, Andryusha - you've seen it through. You had to find such an ERROR.

But if you were more attentive, you would have understood that this "i" does not refer to "ii".

So you can take back your red squares...)))

What's the point of trying five times?
 
Dmitry Sumsky:
Yeah, it was. I have one such "perpetual student" - can only write at dictation... )))

Lawyer son: Daddy, I won a case in court that you've been doing for 20 years.

- What a fool. It's been feeding us all these 20 years.

 
Yuriy Asaulenko:
This one will do just fine.

I agree ) If it said "Write why?" the answer would be wrong. But it's clear, they asked "Write why", and he wrote "why" )) Clearly logical thinking at its best.

And the teacher is either illiterate or it was a subtle test ))

 
In line 13 of this coloured picture, is it just me who feels that the condition check is incredibly redundant?