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
Yes, the opening and closing brackets converge vertically after "Styling", but the backlight either doesn't understand what it is, or I can't see it. The level of programming skill, at the moment, is near zero.
Regards, Vladimir.
the highlighting is a lit bracket first after the title of the function, it should be lit in pair with the bottom one, i.e. each bracket should have a pair, they are lit, if not, it means there is a missing closing bracket
the highlighting is the lit bracket first after the function header, it should be paired with the bottom bracket, i.e. each bracket should have a pair, they are lit, if not, then the closing bracket is missing
Thanks for the hint. It turns out they are not highlighted on my screen, but highlighted by the thickness. Yes all the brackets are there. Now, just moved the function block behind the bottom OnStart bracket and the errors have disappeared. Thank you for your help!
Regards, Vladimir.
Thanks for the tip. It turns out they are not highlighted on my screen, but stand out in thickness. Yes, all the brackets are there. Now, just moved the function block behind the bottom OnStart bracket and the errors have disappeared. Thank you for your help!
Regards, Vladimir.
All functions are declared in the global scope, i.e. outside the space of other functions, which is bounded by their parentheses.
Dear Peter, tell us how you managed to create your so-called markup language (), it will be useful for newcomers, and I need it to develop logical thinking, which is very important here
maybe something ate a lot, climbed a treeGood evening all!
Dear programming experts, could you please tell me what does the error the compiler generates mean:" function declarations are only allowed in global, namespace or class area", or to be more specific, what is a namespace and where should it be located in the script?
The question is related to writing function code for "Enough_time" and "Enough_patience".
Regards, Vladimir.
Global Area, the area outside of functions. It makes no difference where, you can between functions, I hope you understand where they begin and end, you can do everything you can in the global scope, declare global variables, properties or whatever. Variables declared in the global scope are visible everywhere, literally. Local scope is the area from the beginning to the end, closing curly braces, of the function. Variables declared in the local area are only visible in this area.
Please note that the code is read from top to bottom and from left to right. The compiler doesn't rearrange strings. So, the rule is that a variable is always declared above or to the left of the reference to it. And only in its own scope. In different local areas variables can have the same names. And by the way loops and if they are functions with their own areas too)
The global scope, the area outside of functions. and it makes no difference where, you can between functions, I hope you understand where they start and end, you can do everything in the global scope at the end, declare global variables, properties or whatever. Variables declared in the global scope are visible everywhere, literally. Local scope is the area from the beginning to the end, closing curly braces, of the function. Variables declared in the local area are only visible in this area.
Please note that the code is read from top to bottom and from left to right. The compiler doesn't rearrange strings. So, the rule is that a variable is always declared above or to the left of the reference to it. And only in its own scope. In different local areas variables can have the same names. (And by the way loops and if they are functions with their own scopes too)
we should write a book. together all of us
All functions are declared in the global scope, i.e. outside the space of other functions, which is limited by their parentheses.
Thank you, Peter! I have already been helped to understand this issue.
I am continuing my study of MQL5 programming language and today I am pasting the code of a script, which is a continuation of one of the tasks from the participants of this thread. I tested the script in all modes. Everything works as it should. I have set the input parameters to a minimum to begin with.
Regards, Vladimir.
Thank you, Peter! I have already been helped to understand this issue.
I continue studying the MQL5 programming language and today I am pasting the code of a script, which is a continuation of one of the tasks from the participants of this thread. I tested the script in all modes. Everything works as it should. I have set the input parameters to a minimum to begin with.
Sincerely, Vladimir.
Thank you, Peter! I have already been helped to understand this issue.
I am continuing my study of MQL5 programming language and today I am pasting the code of a script, which is a continuation of one of the tasks from the participants of this thread. I tested the script in all modes. Everything works as it should. I have set the input parameters to a minimum to begin with.
Regards, Vladimir.
Describe (write) what your script does. And it's always better to do it at the beginning. The target, why. What tasks can achieve the goal. How the tasks can be solved, the algorithms for solving them and then the code. And by the way, the division of tasks is decomposition)
We should write a book. Together we should all
This question is long overdue. Sergey Kovalev has written a manual for the MQL4 programming language. Now another expert has to be inspired to do this noble deed for MQL5.
Best regards, Vladimir.