Errors, bugs, questions - page 2755
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
Compiler error. Works fine in older builds.
I have such a simple Expert Advisor (see screenshot).
There are Chart objects overlaid on the chart.
Before yesterday's terminal update trading levels were shown on the charts, but now they disappeared.
I have created charts as shown in example in manual. I have not found any chart properties to display trade levels (only basic charts have such property).
Please help.
Screenshots from MetaTrader platform
GBPUSD, M5, 2020.05.25
Forex Club International Limited, MetaTrader 5, Real
Hi. Please help me to understand what is written.
mqlrate rt [2] ;
Am I correct in assuming that this is an array of two structures which automatically received the same structure data?
Just further there is no assignment of data to the array and then the data from the array is used at once.Hi. Please help me to understand what is written.
mqlrate rt [2] ;
Am I correct in assuming that this is an array of two structures that automatically received the same data?
Written in MQL5:
means: a static array of twoMqlRates structures is declared. After declaration, these structures may store gibberish, so these structures need to be explicitly filled with data.
Writing in MQL5:
means: a static array of twoMqlRates structures is declared. Once declared, these structures can store gibberish, so these structures need to be explicitly filled with data.
Compiler error. Works fine in older builds.
Yes there is such a thing, reportedas far back as 2020.03.25, already day by day for 2 months...
(not fixed by MT5(build 2390)) (new) Compile Error, when using default access modifier when inheriting in template class, when template parameter acts as base class.
Another bug:
C::operator=, although D::operator= is executed here. To work around the bug, you have to overload the operator for all the base classes in the hierarchy.
p.s. In general, the developers promised to fix incorrect assignment operator behavior long ago, but it is still there. This is an outrage. For instance, the following code compiles without errors although it is assigning something:
One more bug:
1) It complains about C::operator=, although D::operator= is executed here. To avoid the bug, we have to overload the operator for all the base classes in the hierarchy.
2) In general, the developers promised to fix incorrect behavior of the assignment operator long ago but it is still there - it is an outrage. For instance, the following code compiles without errors although it assigns whatever it is:
1) This is most likely not a bug but rather a natural behavior considering the specifics of MQL, namely:
In MQL, methods and fields of the base class are "directly available" from the derived classes.
In essence, the inheritance behavior in MQL is similar to using declaration for each basic field and method in C++.
C++ online:https://onlinegdb.com/rJkckvFsU
Thus, all operator= functions from the base classes are also involved in the operationd = c;
when searching for the appropriate function.
As a result, the optimal signature for an overloaded function call is the default and deleted void operator=(const C&).
1) Most likely, it is not a bug, but natural behavior considering peculiarities of MQL, namely:
In MQL, methods and fields of a base class are "directly available" from descendant classes.
In essence, the inheritance behavior in MQL is similar to using declaration for each basic field and method in C++.
C++ online:https://onlinegdb.com/rJkckvFsU
Thus, all operator= functions from the base classes are also involved in the operationd = c;
when searching for the appropriate function.
As a result, the optimal signature for an overloaded function call is the default and remote void operator=(const C&).
You don't have to look for the sacred meaning in an obvious language flaw. I already raised this problem here and Ilyas assured that it will be fixed. But almost 10 months have already passed. (
In essence, the inheritance behavior in MQL is similar to that in C++ using declaration
Yeah, well, if in MQL for example 2 x 2 = 5, you could say that it's the same as in C++ adding an increment operation to the result)
You don't have to look for sacred meaning in an obvious flaw in the language.
It was explained to you how and why it works, if it's difficult for you - fortunately I can't help...
It's not a sacred meaning, but a common approach in order to lower the user input level, so that they can access fields and methods of the base class without using "this.", and also in cases of overloading-a base class function.