Errors, bugs, questions - page 2258
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
You need to be able to track changes in the properties of all charts, not just the one on which the MQL program is placed.
Make a crutch through a timer.
Make a crutch through the timer.
I don't want to make a crutch. MQ developers can expand possibilities.
Forum on trading, automated trading systems & strategy testing
Bugs, bugs, questions
Anatoli Kazharski, 2018.08.20 08:11
I want to be able to track changes in properties of all charts, not only the one where MQL-program is placed.
Right now theCHARTEVENT_CHART_CHANGE event does not contain any other parameters:
Event
Parameter value id
parameter value lparam
parameter value dparam
Parameter value sparam
The event of changing the chart dimensions or changing the chart properties via properties dialog
CHARTEVENT_CHART_CHANGE
-
-
-
//---
To track this event on other open charts, monitoring could be enabled by specifying the ID of the desired chart.
For example, like this:
As lparam-parameter could be the identifier of the chart on which changes were made. The sparam parameter could be the name of the symbol.
Error during execution:
Result: Expected:
A::f<int>:1 A::f<int>:1
A::f<int>:753790661 A::f<int>:2
A::f<int>:Error:4007
Otherwise:
Fine. What's the difference? Why did the array size suddenly become 753790660 (instead of one) and as a consequence memory suddenly ran out (4007) ? MT5\1881\32
Moreover... if you delete literally three characters in the class in the first case, the result will also be ok
Thanks for the message.
Fixed.
To work in current build, do not specify class scop when declaring its methods.
Other bug reports are related to this one and will not be reproduced after the fixes are made.
the example from the help does not work:
https://www.mql5.com/ru/docs/basis/function/operationoverload
the example at the very bottom of the page does not work, from the words:
Другой пример перегрузки операции индексирования - работа с матрицами. Матрица представляет собою двумерный динамический массив, размеры массивов заранее неопределены. Поэтому нельзя объявить массив вида array[][] без указания размера второго измерения и затем передавать этот массив в качестве параметра. Выходом может служить специальный класс CMatrix, который содержит в себе массив объектов класса CRow.
the compiler writes:
object of 'CMatrix' cannot be returned, copy constructor 'CMatrix::CMatrix(const CMatrix &)' not found tst.mq5 244 14
object of 'CMatrix' cannot be returned, copy constructor 'CMatrix::CMatrix(const CMatrix &)' not found tst.mq5 261 11
object of 'CMatrix' cannot be returned, copy constructor 'CMatrix::CMatrix(const CMatrix &)' not found tst.mq5 281 14
object of 'CMatrix' cannot be returned, copy constructor 'CMatrix::CMatrix(const CMatrix &)' not found tst.mq5 303 11
4 error(s), 0 warning(s) 5 1
Compilation error (ME\1881\32)
And so:
fine. What difference does it make?This is not the reason.
this helps a lot when reading code and helps avoid errors in some situations.Note that this in MQL does not work everywhere:
that in C++ it compiles without error
Note that this in MQL does not work everywhere:
that in C++ compiles without error
C++ has a knack for perversion. Perhaps somewhere in macros this could be used, but not directly.
It may be possible to use this somewhere in macros, but not directly.
Macros have nothing to do with it at all - replace this with a normal pointer and you have exactly the same syntax:
In MQL you cannot explicitly refer to b.A::x, while in C++ you can. Why such a restriction?Macros have nothing to do with it at all - replace this with an ordinary pointer and you have exactly the same syntax:
In this case it's justified. The variant with this - it's not clear why to write it that way. When A:: already says it all.