![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Look: you set both variables to true beforehand (before the condition). That is, they will ALWAYS be true at every launch of the script. Why, then, do we need a condition? Is it possible in this program that variables explicitly initialized with true may not be true? - No! Because you have written this value into them and it cannot be changed anywhere in the code.
Thanks, Peter, for the clarification!
Regards, Vladimir.
There is no logic, because these are variables defined in the script. They should either be variables that the user sets via an intu or derived from functions, which is even more logical.
I.e. the utility of the script should always be there. Just a script that displays text is useless. And with data entry this script will tell you if you can learn the language) And with functions, they simply do not exist, they are not written, and if you write, for example, a calculation from the level of knowledge of mathematics, knowledge of other languages, how much free time, level of desire and ability to memorize and the function will return True or False based on the calculation, the usefulness will be more))))
Valery, thank you very much for the detailed reply!
Sincerely, Vladimir.
Here's a revised version of the script, including hints for those new to the script who may or may not be reading this thread:
Added to the script:
Regards, Vladimir.
Yes, this variant is correct in terms of syntax, but it still lacks logic. Yesterday Vasily wrote a lot about functions. This is where they are needed:
+1. That's correct.
"... You have to calculate time and patience before you put them in a condition rather than setting them by default, because the meaning of having a condition disappears - it is always true."
I will definitely do that, but later, as my "pot" is already boiling, so I need to cool it down a bit.
Sincerely, Vladimir.
Here's a corrected version of the script, taking into account the hints:
Added to the script:
Regards, Vladimir.
You are right! And then try to write functions that calculate the values of these variables depending on the values of other external variables.
Peter, put your suggestion into my self-study plan. The result will be later posted in the form of code script.
Regards, Vladimir.
I will definitely do that, but later, as my "pot" is already boiling, so I need to cool it down a bit.
Sincerely, Vladimir.
Right! And then try to write functions that calculate the values of these variables depending on the values of other external variables.
It's more or less clear with time, but the variables for "Enough Patience" are still a problem. What should I put in them? Have patience or no patience? At least these two parameters? I need to think about it.
Regards, Vladimir.
Time is more or less clear, but the variables for "Enough patience" are a problem. What do you put in them? Is there patience or no patience? At least these two parameters? I need to think about it.
Regards, Vladimir.