You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The wording is not quite right, depending on the iterator, actions must be performed in the body of the loop. Depending on the iterator. And return the result of performing these actions in the loop body. If the loop was passed and there were no break or contingency statements, then to Expression 3 and then to Expression 2 and if it is True, then with a new iterator to the body of the loop.
That's it! Going to hang myself... Didn't understand anything at all. I needed a pause for comprehending what I had written.
Regards, Vladimir.
By the way, there's nothing in the MQL5 Reference about the fact that the loop should return something upon completion. Maybe I misunderstood something again? Or maybe it refers to the if statement?
Sincerely, Vladimir.
I didn't say it right, the loop returns nothing, but you have to know the result of calculation somehow.)
Hang yourself early, it's more complicated.)
That's it! I'm going to hang myself... I don't understand anything at all. You need a pause to comprehend what you've written.
Respectfully, Vladimir.
Norm, if you don't understand it the first time, you have to read it a second time... But not immediately, walking helps. The cycle is well explained in Kovalev. Or in C textbooks. It just needs to be understood. And then you will understand where you need it and where you don't.
When initiating the loop, the first iteration of Expression 1 and into the loop body, at the end of the loop body Expression 2, then Expression 3 and if it is False the loop ends, and if it is true the next iteration into the loop body.
I said it wrong, the loop does not return anything, but you need to know the result of the calculation somehow, I showed an example of this solution)
Yes, I'm already sitting here figuring it out and want to understand it thoroughly, what and for what. Thanks for the tip!
Regards, Vladimir.
Norm, if you don't understand it the first time, you have to read it a second time... BUT not immediately, walking helps. The cycle is well explained in Kovalev. Or in C textbooks. It just needs to be understood. And then an understanding will come where it's needed and where it's not.
Right, we should go and have lunch at the same time.
Sincerely, Vladimir.
Norm, if you don't understand it the first time, you have to read it a second time... BUT not immediately, walking helps. The cycle is well explained in Kovalev. Or in C textbooks. It just needs to be understood. And then you will understand where you need it and where you don't.
At loop initiation, the first iteration of expression 1 and into the loop body, at the end of the loop body, expression 2, then expression 3, and if it is False, the loop is terminated; if it is true, the next iteration into the loop body.
Valery, please clarify what you call the loop body? Expressions 1, 2 and 3 or the if statement which should be executed when looping through positions? In short, you need to reread the subject of loops in Sergiy Kovalev's textbook.
Regards, Vladimir.
This is what I found in Sergei Kovalev's tutorial for MQL4 programming language:
Regards, Vladimir.
Valery, please clarify what you call the body of the loop? Expressions 1, 2 and 3 or the if statement, which should be executed when looping through positions? In short, you need to reread the subject of loops in Sergei Kovalev's textbook.
Sincerely, Vladimir.
The body is the contents of the operator/function, i.e. what exactly it does.
Expressions 1,2,3 are mandatory parameters, they usually pop up in the hint window when writing code
Body, this is the content of the statement/function, i.e. what it does
Expressions 1,2,3 are mandatory parameters, they usually pop up in the hint window when writing code
Thanks for the tip. I also found the information on the body in Sergei Kovalev's tutorial.
Regards, Vladimir.
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.