Errors, bugs, questions - page 2074
![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
When using the indicator in the bottom window, auto scaling does not work correctly.
If two buffers are required in data window, but only first buffer participates in drawing, and second buffer has "DRAW_NONE" type - without drawing, scaling is performed by second buffer (values of second buffer are more than first one), although scaling should not be performed by it (type "DRAW_NONE").
The first buffer is accurate to 6 decimal places (for example - 0.0001249 AC indicator). The second buffer contains values -2, -1,0,1,2 (analogue - no, undefined, yes, etc.)
When using the indicator in the bottom window, auto scaling does not work correctly.
If two buffers are required in data window, but only first buffer participates in drawing, and second buffer has "DRAW_NONE" type - without drawing, scaling is performed by second buffer (values of second buffer are more than first one), although scaling should not be performed by it (type "DRAW_NONE").
The first buffer is accurate to 6 decimal places (for example - 0.0001249 AC indicator). The second buffer contains values -2, -1,0,1,2 (analogue - no, undefined, yes, etc.)
Why is the compiler silent?
Didn't we create named constants when declaring the enumeration and didn't the name "zero"=1 occupy the global level?Why is the compiler silent?
For the same reason.
Use ::.For the same reason.
Use ::.Thank you.
The :: enum works. And it works even if the enum is specified inside OnStart()
It's just that if it were a function, it would be understandable. It is also described in the help.
But zero here is an initialized constant. I thought these were different things.
That's why I asked - why doesn't the compiler generate a warning that the zero name is already used in the global context?
Where is it written in the help? Or is it undocumented?
Why doesn't the compiler generate a warning that zero is already being used in a global context.
Bug. If it were not an enum but a variable, it would generate "declaration of 'xxx' hides global declaration at line yyy". Write to the SD.
Will be fixed in the new build.
Flaw. If it were not an enum but a variable, it would return "declaration of 'xxx' hides global declaration at line yyy". Write to the SD.
I wrote it in SD.
And if we consider the case when an enum is inside OnStart().
It won't generate the warning either.
What does it have to do with context? Everything happens inside one function here...
It turns out that the constant names from enum are not checked for being occupied at all. They are replaced in the code before the checks. Does it seem so?The SD has written.
And if we consider the case of enum inside OnStart().
It won't generate a warning message either.
What does it have to do with context? Everything happens inside one function here.
It turns out that constant names from enum are not checked for being occupied at all. They are replaced in the code before the checks. Does it look like that?You have already written it in SD.
I am writing an EA,
when I enabled optimization in MT5, I get blue screen W10x64 b1653 repeatedly
may be someone has faced with this phenomenon?
What is the reason for it?