Errors, bugs, questions - page 2674
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
Please remind me if there is a neat way to resolve the "ambiguous call to overloaded function" error when you need separate handling for simple types and pointers, like this:
Here the compiler considers that (BaseFunctor *) also corresponds to V. You can explicitly specify the type conversion when calling a method, but it's ugly. If you take a parameter by reference in a template function, you cannot pass constants and other temporary values (a variable is required).
try adding an overload with a reference
Do you mean overloading with object reference or pointer reference (which doesn't seem to exist)? I don't know how to slip a pointer to a distributed new instance into an object reference.
Your cycle is not correct for closing positions. Make a reverse cycle.
Your cycle is not correct for closing positions. Make a reverse cycle.
I'll try, but doesn't it matter how to loop if we are looking for all profitable positions of the same direction. We will go through all of them anyway and close the necessary ones.
Do you mean overloading with object reference or pointer reference (which doesn't seem to exist)? I don't know how to slip a pointer to a distributed instance into an object reference.
With an object reference.
I have it like this:
with reference to objects.
I have it like this:
Still not that straightforward, sorry ;-). The class is used for inheritance:
If you could create a BaseFunctor, it would work, yes. But that's not the case.
Hello!
Thank you for reporting the error!
Could you please elaborate on the problem with the picture?
No problem at the moment
The code below outputs 牖漠摲牥湩潦〉〮र〲थ⸰〰㠉┰〉〮र
It's supposed to output the text test
The files are in the Files\\\Test\\ folder.
Function says that handle is correct it's 1 and immediately GetLastError says error 5008 Wrong handle ....
What should I do?
Very nasty MT5(build 2316) bug, blocking further development.
You create a complex wrapped object with internal type "C" several times, but it turns out to be quite a different data type, maybe "B", "int", whatever you want...
It took me a lot of time and effort to find and understand that the problem is not in the code but in the MQL compiler. (C++ online:https://onlinegdb.com/H1R1fR5ML)
Presumably, the problem is in the work of the template class "main_wrapper" cache during code generation at compilation time when the internal class "internal_wrapper" from the template class "A" is passed as a parameter for different data types (int, B*, B, C).
What first data type is created by the template class "main_wrapper<A<TEMPLATE_TYPE>::internal_wrapper>, such data type will be further used in all objects of the template in the future.
Another bug with the generation of the template class code will be provided below.
Thanks for the post, fixed
The code below outputs 牖漠摲牥湩潦〉〮र〲थ⸰〰㠉┰〉〮र
It's supposed to output the text test
The files are in the Files\\\Test\\ folder.
Function says handle is correct it's 1 and immediately GetLastError says error 5008 Wrong handle ....
What should I do?
What encoding is the file in?