Metatrader known bugs ... - page 14

 
mladen:
One more game that metaquotes have prepared to us : this is an indicator that compilers with 0 (zero) errors or warnings, does not trigger any run-time error and still does not work OK (it is an original that worked just fine in metatrader 5). I am leaving it as is as a game so that if someone wants to try to find what exactly is causing this (as I said - do not expect help from compiler - there will be no error nor warning messages). Tested on build 613 Conclusion : do not trust the compiler, but then, that will be a real fun to try to code something without being able to trust the compiler

MLaden, can you post a picture of what it looks like on XAUUSD, H4?

Removed Angle, unused, and compiled on 610. Nothing on H1

but when I switched to H4, this showed up.

Files:
mar_3.png  119 kb
 
Tzuman:
MLaden, can you post a picture of what it looks like on XAUUSD, H4?

Removed Angle, unused, and compiled on 610. Nothing on H1

but when I switched to H4, this showed up.

Tzuman

This is how it should look like when it is correct (I am using build 613) :

PS: I did post the one that shows correct values here https://www.mql5.com/en/forum/178416/page22 . When you see what is the reason for the error, you will agree with me that now we really can not trust this compiler nor terminal

Files:
gold_1.gif  54 kb
 
mladen:
Tzuman When you see what is the reason for the error, you will agree with me that now we really can not trust this compiler nor terminal

I'm already a believer.

 

A possible problem : so far it seems that metatrader 4 does not load dlls per chart but per terminal. Meaning : if you have some code that is using a dll, your dll is not going to be loaded once per chart (nor once per indicator or EA instance) but once per the whole terminal

Looking into this for the last couple of days, but if it is so, it will mean a lot of dll rewriting (so far I am not 100% sure, only about 90%, if I find out for 101% sure will post the example here) and can cause some serious problems (one of those is that you are probably not going to be able to protect your code using some dll)

 

I was expecting that with time metatrader will work better. Boy, was I wrong!

 

We have been repeatedly told that old ex4 files will work OK when used from new metatader 4 and that only some rare cases will not. Here is one simple case when an old ex4 is giving a "result" without any changes (it works perfectly when used from build 509). Don't hope for too much : the further the "development" goes that more frequent such pearls of compatibility are becoming

Files:
old_ex4.gif  37 kb
 

The number of stuff that does not work and does not show any error either is greater and greater each day. We are going to have a mess much bigger than with metatrader 5 - with metatrader 5 we knew that the code has to be changed. Now we have no idea what can go wrong when mq is promising that it should not (the famous "existing old ex4 files will work" - well, they are not)

 

For debugging purposes : if for some reason the code does not work, use strict to find the error. In a lot of cases zero divide are not reported but are interrupting these new build code and, regardless of what they told that if you do not use strict the arrays will be treated as before, they are not. Sometimes they are sometimes they are not. As if there is no rule how the arrays are handled.

Even using strict sometimes will not happen but you will have to do guessing work in order to assume where the error can be (errors are in those cases not in your code)

 

I am having problems with EAs. For now I have to stop live trading

 
mladen:
For debugging purposes : if for some reason the code does not work, use strict to find the error. In a lot of cases zero divide are not reported but are interrupting these new build code and, regardless of what they told that if you do not use strict the arrays will be treated as before, they are not. Sometimes they are sometimes they are not. As if there is no rule how the arrays are handled. Even using strict sometimes will not happen but you will have to do guessing work in order to assume where the error can be (errors are in those cases not in your code)

It also appears that when #property strict is applied that the strict enforcement will also apply to the execution of all iCustom calls initiated by the parent indicator. Could be part of Checkin's EA problem also

Reason: