Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 869
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 help section tells you what it's for. And, yes, it is correct that a parameter entered by the user cannot be changed programmatically. At least something can belong to the user :)
If you really want to, you can)
If you really want to, you can)
I often encounter a problem. The compiler swears with a "variable already defined" error on the code:
The reference guide at https://docs.mql4.com/ru/basis/variables/local says:
Variables declared inside a block (on internal level) have the scope ofthe block.
If blocks are nested andthe identifier in the external block has the same name as the identifier in the internal block, the external block identifier is "invisible" (hidden) until the internal block completes.
But even the example from the same reference book does not compile with the same "variable already defined" error:
Same problem with cycles:
How can we get around this problem and make the directory example compile without the "variable already defined" error?
I often encounter a problem. The compiler swears with a "variable already defined" error on the code:
The reference guide at https://docs.mql4.com/ru/basis/variables/local says:
Variables declared inside a block (on internal level) have the scope ofthe block.
If blocks are nested andthe identifier in the external block has the same name as the identifier in the internal block, the external block identifier is "invisible" (hidden) until the internal block completes.
But even the example from the same reference book does not compile with the same "variable already defined" error:
Same problem with cycles:
How can we get around this problem and make the directory example compile without the "variable already defined" error?
How can I get around this problem and get the directory example to compile without the "variable already defined" error?
not all examples in the reference book work correctly for a long time
by scope in your examples - visibility within a single operator is local, it should definitely work like this:
i.e. visibility within a for statement is local, the i and x variables will be lost when you exit it
Tried to look for the last peak of Peak Repainter indicator to be processed by EA:
The result is that 1 is written to the global variable, even though it should actually be -1.
What is wrong? With the code? With the indicator?
The indicator is used with the default setting.
Tried to look for the last peak of Peak Repainter indicator to be processed by EA:
The result is that 1 is written to the global variable, even though it should actually be -1.
What is wrong? With the code? With the indicator?
The indicator is used with a default setting.
Why is the name of the indicator like that?
Why the name of the indicator?
I just keep indicators for different EAs in different directories. And I slightly rename them so that they are grouped.
Does the name affect anything?
I just keep the indicators for different EAs in different directories. And I slightly rename them so that they are grouped together.
Does the name affect anything?
It does, all access to files in МТ4 takes place inside MQL4 folder, exit from Expert Advisors/Scripts/Indicators outside this folder is excluded for security reasons
affects, all access to files in MT4 takes place inside the MQL4 folder, exit from EAs/scripts/indicators outside this folder is excluded for security reasons