Errors, bugs, questions - page 2654
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
Can anyone enlighten us on the following question:
Have a dll written in C# but compiled:
- for MT5 usual C# project - Net Framework dll - 64 bit
- MT4 - Net Framework dll - 32 bit, but wrapped in managed C calls
Sources dll are 100% identical, except MT4 wrapper of course,
OS Win10-64
Well, the question is why MT4 calls functions exactly 4 times faster, the figures are approximately 100 000 dll calls on MT4 for 7.5 seconds, MT5 for 30 seconds
Can anyone enlighten us on the following question:
Have a dll written in C# but compiled:
- for MT5 usual C# project - Net Framework dll - 64 bit
- MT4 - Net Framework dll - 32 bit, but wrapped in managed C calls
Sources dll are 100% identical, except MT4 wrapper of course,
OS Win10-64
Well, the question is why MT4 calls functions exactly 4 times faster, the figures are approximately 100 000 dll calls on MT4 for 7.5 seconds, MT5 for 30 seconds
IMHO. C-runtime in one case and a virtual machine in the other.
A graphical interface is implemented in the Expert Advisor. User events are also implemented (e.g. GUI change events). I perform debugging on real data (F5). As soon as I put a breakpoint on a user event - the debugger stops, but the subsequent pressing F5 (continuing debugging) does not lead to changes in the GUI itself. Question: should this be the case, or is this a debugger bug?
If I remove the breakpoint (debugging continues) - changes in the GUI are normal.
MT5, build 2340.
IMHO. C-runtime in one case and a virtual machine in the other.
there's a virtual .Net in both dlls
i found the difference in the code, i even threw the 32 bit base class in a separate thread, because it has no other way of working
I made the same manipulations for MT5, the results are more or less the same (three tests each):
MT5: cycle 100000 , time 8.482981 sec , cycle 100000 , time 8.638789 sec , cycle 100000 , time 8.390046 sec
MT4: cycle 100000 , time 7.128857 sec , cycle 100000 , time 7.176361 sec , cycle 100000 , time 7.205439 sec
Greetings ! Happy Holidays to all the men !!!!
I don't understand what's the strange bug with zigzagging display of equity in the tester. I don't understand the strange bug with zigzagging equities display in the tester. If I change the "Settlement method" setting from "Exchanging Stoks" to "Forex", equity is displayed normally. I had the same experience a few years ago, I wanted to try to connect MT5 to a fund, tested it, got scared and gave up. Now I tried it again and the same thing. Is it strange?
The problem is solvable for methods of "typed" container classes, but it's not solvable for normal functions.
The main contradiction is that for transferring structures it's necessary to use transfer by reference, and for literals and temporary variables - transfer by value.
As the result, we get a compilation error for normal lvalue types because both overloaded functions are suitable for the call.
As a partial solution and only for "primitive" types, you can build 12 overloaded functions:
But if a function is to accept two "universal" arguments, then only 144 overloaded functions are needed to implement it, while in the case of three such arguments, the whole 1728 overloaded functions are needed.
Suggestion:
Finally allow users to pass literals and temporary variables as const ref function arguments.
Let it be a separate # directive - whatever...
Defects in template function/class cache operation:
(not fixed by MT5(build 2340)) ** Undefined Behavior, you create a complex wrapped object with internal type "C" several times and it turns out to be a completely different data type, maybe "B", maybe "int", whatever you want...
(not fixed by MT5(build 2340)) * Compile Error, bug on passing a function pointer as a const ref template argument.
(not fixed by MT5(build 2340)) * Compile Error, B<int> object can be created after the B<void*> class object, but if done before, a compile error occurs.
Defects in template function/class work:
(not fixed by MT5(build 2340)) ** Compile Error, bug inside template function, passed pointer withinexplicit type conversion operation behaves like a class otherwise like a pointer.
(not fixed by MT5(build 2340)) ** Compile Error, bug with template class code generation while using internal class.
(not fixed by MT5(build 2340)) ** Compile Error, bug on attempt to access internal class for template parameter of template function.
(not fixed by MT5(build 2340)) ** Compile Error, bug on generation of template method/class, the process of "auto-replacement" of the template parameter goes outside of the scop into the main program code.
(not fixed by MT5(build 2340)) * Compile Error, the bug with template class not generating code automatically when the template class acts as a return value for the template method.
(not fixed by MT5(build 2340)) * Compile Error, bug in internal class definition - there is no possibility to refer to global namespace explicitly when specifying the base class.
Defects in overloaded function calls priority mismatch in MQL compared to C++:
(not fixed by MT5(build 2340)) *** Compile Error when there is class inheritance A <= B <= C <= D and two overloading functions are implemented, for example, one with parameter A* and one with parameter B*, then passing in such function an object C* or D* in MQL causes a compilation error "ambiguous call to overloaded function".
(not fixed by MT5(build 2340)) ** Runtime, Priority mismatch for overloaded template function calls.
Suggestions:
link- on allowing literals and temporary variables to be passed as const ref function arguments.
link- whenmoving projectfiles in the Project tab, for moved files that are open and located in ME tabs, to automatically update their location path.
link- to introduce typedef declaration functionality in MQL.
link- about providing possibility to force generation of default copy constructors and assignment operators.
I'm asking for help, I'm completely out of the loop.
In OnChartEvent, by pressing `C` I cancel/restore the price chart.
And everything would be fine, but if the keyboard layout is not selected English - does not work.
How to make the detection of pressing `C` independent of the selected layout?
I'm asking for help, I'm completely out of the loop.
In OnChartEvent, by pressing `C` I cancel/restore the price chart.
And everything would be fine, but if the keyboard layout is not selected English - does not work.
How to make the detection of pressing `C` is independent of the selected layout?
Need to checklparam
For both ru and en keyboard layouts (both lowercase and uppercase) lparam will be 67: