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

 
Yuriy Asaulenko:

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.

That's right. I have been doing one and the same task with him for several months, and he cannot understand why I must check account state in OnTick() first, and then, if there are no orders, set new ones. He keeps trying to set it first and then cannot understand why orders are put on every tick...
 

Imho, it is too early for the author of the topic to promise to help newcomers join the ranks of professionals.

Here in this thread I have seen, for example, Combinator (TheExpert) and Dmitry Fedoseyev (Integer) who were admitted to the "pro list" in 2009. /*<= I remembered at random: https://www.mql5.com/ru/forum/116708 */.

Also, as an example: articles by Dmitry Fedoseyev for beginners (they are suitable not only for the MQL5 programming language, but also for the current MQL4) are excellent beginner's guides. In addition, they are publicly available on the website and can be read/watched/comprehended/something to try for yourself as needed.

In other words, topics such as this one are, in essence, like:

"Е. Ivanova from Tmu-Tarakani on instagram: model, blogger, singer, composer, photographer, handmader, artist, poet, woman

Madonna on instagram: Madonna" (c)

where E.Ivanova is not Combinator (TheExpert) or Dmitry Fedoseyev (Integer).


 
Dmitry Fedoseev:
In line 13 of this coloured picture, is it just me who thinks that condition checking is incredibly redundant?
That's the way it's designed - there are as many conditions as you need (neither more nor less)... )))
 
Dmitry Sumsky:
Right. I have been doing the same task with him for several months now, but he cannot understand why onTick() he must first check account status, and then, if there are no orders, set new ones. He keeps trying to set it first, and then he cannot understand why orders are put on every tick.
You have to teach logic, not language. Let's say, in the old fashion, using flowcharts (algorithms). That's the best way to get started. Then it will disappear on its own.
 
Dmitry Sumsky:
That's the way it's meant to be - there are as many conditions as you need (neither too many nor too few)... )))
The timeframe of price and SAR is the same, the moment of SAR direction change is searched for. There are too many checks for that. But the question of 5 attempts to delete the graphical object is more interesting.
 
Yuriy Asaulenko:
You should teach logic, not language. Let's say, in the old fashioned way, block diagrams (algorithms). That's fine for starters. Then it will fall off by itself.

taught all sorts of things. He just "wants" to be a programmer, but does nothing for it. As long as I explain, he understands, the next day he can't remember or understand anything. And every time...

As the saying goes: "You can't fish out of the pond without work".

 
Dmitry Fedoseev:
The timeframe for price and SAR is the same, searching for the moment of SAR direction change. There are too many checks for this. But the question about 5 attempts to delete the graphical object is more interesting.
It may fail to draw or delete an object at once. So I threw in five attempts - in any case, if it removes the object for 1 time, then a "break" will be triggered. It doesn't affect CPU load in any way... )))
 
Dmitry Sumsky:
Sometimes it doesn't draw or doesn't delete at 1 time. So I've given it five tries - in any case, if it removes an object in 1 time, a "break" will be triggered. It doesn't affect CPU load in any way... )))
Well, look at how it works and then it doesn't. Amazing!
 
Dmitry Fedoseev:
What a thing, it works, then it doesn't. Miracles!
Yes, miracles do happen. I can't even imagine what it's related to. That's why they are miracles... )))
 
Andrey F. Zelinsky:

Before I forget -- looking through your code.

Do you have nothing better to do than to spend hours looking for bugs in my code or I hurt your feelings and you want to take revenge?

You're a strange man, Andrew...

Reason: