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've encountered a call stack overflow problem (so I think).
After calling a method of one of the objects , see example below. The code is simplified, just the gist. Class CClass1 is a base class and list1 has different objects which are descendants of this class and their init functions are implemented differently. So, in one class where the init function fetches such a list (to put it simply, it initializes a nested interface, a panel in the panel) after returning from init in the line
there is an error
2010.12.02 00:21:00 test1 (EURUSD,H1) Invalid pointer access in 'Container.mqh' (74,10)
I.e. pointer t is dead.
When debugging, there is no such error, after method call the pointer is "alive", nested interfaces are created and Expert Advisor works further.
This is the only way around the error:
#property stacksize pointer achieved nothing.It is hard to say anything for sure. You need the source code.
Try to write a request to servicedesk.
I came back from holiday, started terminals, updated to 360 build and one indicator stopped working...
I read the changes: 6. MQL5: Fixed processing of click event on a chart.
Now when you click on a graphical object two events are generated at once: CHARTEVENT_OBJECT_CLICK + CHARTEVENT_CLICK, while before there was only one CHARTEVENT_OBJECT_CLICK, which allows to simulate a double click
Will it always be like this or is it a bug?
Came back from holiday, started the terminals, updated to 360 build and one indicator stopped working...
reading in changes: 6. MQL5: Fixed processing of click event on a chart.
Now when you click on a graphical object two events are generated at once: CHARTEVENT_OBJECT_CLICK + CHARTEVENT_CLICK, while before there was only one CHARTEVENT_OBJECT_CLICK, which allows to simulate a double click
Will it always be like this or is it a bug?
Once again I hit the wall of impossibility,
I need to pass a parameter to the constructor, so that the class will be initialized with certain parameters,
how do I get around this problem? What do you recommend?
Once again I hit the wall of impossibility,
I need to pass a parameter to the constructor for the class to be initialized with certain parameters,
How do I get around this problem?
к
well, i don't see any other way out
and, of course, you have to put the Inits in the right order in the case of inherited classes
I wish they would write an article about error handling in complex projects,Print and return as here is not the solution.
Well, I don't see any other way out.
And, of course, you need to put the Inits in the right order in the case of inherited classes
In general, I would like them to write an article on error handling in complex projects, Print and return as here is not the solution.
That is, to create a pre-constructor that would complete the constructing process, and which in turn displays an initialization flag.
In general, it's a good solution, but there are some inconveniences. We have to poll each function with initialization flag, and with large number of class functions, it's not convenient.
What if we have to change something, all the functions would have to be rewritten.
SZ I have edited the code, fixed the typo.
I.e. create a pre-constructor that would complete the construction process, and which in turn sets an initialisation flag.
In general, it's cool, but there are some inconveniences. We will have to query each function for the initialization flag, and with a large number of class functions, this is not convenient.
The code has a large number of class functions, and this is not convenient.
SZ I have edited the code, fixed the oversight.
well, if there was a constructor, it wouldn't mean that the initialization was successful. in any case, you need to verify the fact of initialization
of course you can check it once:
But if you use your own code, you can make it a rule to check the fact of initialization at the time of call, and if it will be used by others, you cannot write in instructions: "you must use only this construction, otherwise I cannot guarantee for consequences". No, you have to check for initialization in class methods anyway.
To the developers.
Immediately after the restart of the new build
PS
Update of terminal installed in different folder was successful, symbols are in list (but there were no open charts before update)...
Tell me if this is a bug or if it's not allowed.
It gives an error
Please tell me if this is a bug or not allowed.
You will get an error
Most likely, the point is that ArrayInitialize() is intended to fill only arrays of a certain type, numeric to be exact (most likely int or double).
Because the array has type ENUM_ORDER_TYPE call of ArrayInitialize will cause an error, saying that this method of call is not allowed.
In my opinion, there are two options in this case:
1. to change the array type ENUM_ORDER_TYPE into int, at the same time taking it into account in the code (at least order types can be easily represented as int);
2. Independently implement "initialization" of the array.