
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
I don't understand "where the dog is buried", the code works, everything is OK, but the compiler warnings possible loss of data due to type conversion Indi.mqh 125 45 make me wonder.
To the developers.
As far as I understand, the swap issue has been resolved? Or then it's not clear why the topic disappeared from the servicedesk.....
When testing an EA
The log shows a constantly increasing number! Is it supposed to be like this?
In MQL4 you should have written
When testing an EA
The log shows a constantly increasing number! Is this supposed to be like this?
Yes, it should be.
You did not initialize the local variable i, which on subsequent calls was allocated in the same place on the stack as on previous calls.
Yes, that's how it should be.
You haven't initialized the local variable i which will be allocated in the same place of the stack during the next calls as it was during the previous calls.
In which case should the static memory class be used?
Incomprehensible sentence in help: "Local variables declared asstatic have scope of a block, despite the fact that they exist from the beginning of the program execution", please explain. There seems to be a syntactical or grammatical slip-up in this phrase :)
Note the example in the help:https://www.mql5.com/ru/docs/basis/variables/static
If you remove word static from the code, nothing will change:
Question: why do we need static at all if it is the same without it?
Hello. You are missing the ExpertParameters parameter in the [Tester] description. You can find out more about it in the help.
Thank you, it's working.
Please tell me, what was the purpose of adding the ability to declare variables within blocks in the first place? Previously in a case like this:
It used to be that a box would pop up that a direct was declared twice and it was clear that you had to come up with another name for the variable or use the same one but without the int. But now it may get confusing. Is it the same in C++?
(I used to program in Visual Basic before learning MQL. There was no such a mess there).
Then in which case should the static memory class be used?
No.
If you created a variable int i;, why didn't you initialize it? In fact, you yourself said "I don't care what's in this variable" and ended up with rubbish in it.
The correct way is int i=0;
Is it like that in C++ too?
I've encountered a problem on Windows 7 64 bit on 306 Bild of the terminal (Windows 7 32 bit all works fine).
I've encountered a problem on Windows 7 64 bit on 306 Bild of the terminal (Windows 7 32 bit all works fine).