Big changes for MT4, in a few weeks - page 108

 
mladen:
Can you post the source?

Could, but I don't think it is this particular source, other indicators won't compile either, metaeditor just won't compile, stops responding and won't shut down. Can't save changed settings for an indicator or save to template. My second attempt at reinstalling showed some improvement, an added indicator stayed on the chart where it simply disappeared before, my only guess is some kind of conflict, I'm not really a programmer or tech wiz, though I've modified quite a few indicators with good results, maybe I'll try another "cleaner" (?) reinstall.

 
remikes:
Could, but I don't think it is this particular source, other indicators won't compile either, metaeditor just won't compile, stops responding and won't shut down. Can't save changed settings for an indicator or save to template. My second attempt at reinstalling showed some improvement, an added indicator stayed on the chart where it simply disappeared before, my only guess is some kind of conflict, I'm not really a programmer or tech wiz, though I've modified quite a few indicators with good results, maybe I'll try another "cleaner" (?) reinstall.

Install it to any folder other than program files (try installing to partition different than C) and add /portable switch to your shortcut (something like on the picture - the important part is the end of the target with /portable added to the command line)

Files:
portable.gif  15 kb
 

Install it to any folder other than program files (try installing to partition different than C) and add /portable switch to your shortcut (something like on the picture - the important part is the end of the target with /portable added to the command line)

Thanks, Mladen, I hope we don't have to go that far. The Liveupdate did not even work, mt4 would not start and showed an error in the files, so it has me concerned. Also very odd that one of the indicators (which happened to be the one I was observing before the "upgrade") just disappeared from the chart after reinstall???

 
remikes:
Thanks again, would not compile at all, no list of errors given (as we are used to when previously compiling) and metaeditor stopped responding?

When you download a new MT4 600, it is not stored at the right place, in my case anyway (FxPro).

The terminal is stored the old way, not the new way.

One has to check the path where his MT4 terminal is stored, in the éditor > flie > open data file.

It has to be something like that : C:\Users\usersname\AppData\Roaming\MetaQuotes \Terminal\ name_of_the_terminal

In the case you are talking, it could be this, just check if your teminal is stocked at the right place,

Look at the path in the downlaod MT4 window; hope it help

 

In just one week metatrader went from build 600 to build 604. Does that sound as if it was ready to be released? And still errors in it

 
checkin:
In just one week metatrader went from build 600 to build 604. Does that sound as if it was ready to be released? And still errors in it

What worries me the most is that now problems with arrays started to surface. In my opinion those are the hardest to pinpoint and if they are having problems with arrays now, we are looking to an uncertain development time (no way how someone can develop something when an error can not be pinpointed in the code but is hidden in metatrader)

 

The fact that people are not complaining more is showing us much more about the statements of metaquotes (of the number of users they have). I guess that this "new" metatrader will cut that number of users even more

 
mladen:
What worries me the most is that now problems with arrays started to surface. In my opinion those are the hardest to pinpoint and if they are having problems with arrays now, we are looking to an uncertain development time (no way how someone can develop something when an error can not be pinpointed in the code but is hidden in metatrader)

A cleaner reinstall seems to have cleared up the problems, metaeditor working etc. ... in removing old folders also found an old copy of mt4 from 2008 that I had forgotten all about, though that did not interfere with the previous update.

Thanks again mladen

 
mladen:
What worries me the most is that now problems with arrays started to surface. In my opinion those are the hardest to pinpoint and if they are having problems with arrays now, we are looking to an uncertain development time (no way how someone can develop something when an error can not be pinpointed in the code but is hidden in metatrader)

In my experience, invalid array indexing, e.g. subscripting outside the array bounds, either upper or lower, can cause this type of problem. Invalid subscripts can modify the user's data storage areas or can even modify the program execution storage, old Professional Basic was renown for this type of problem, very difficult to track down.

Perhaps Option Strict can be useful to pinpoint any of these types of errors. It will run slow but may identify the subscript error.

 
Tzuman:
In my experience, invalid array indexing, e.g. subscripting outside the array bounds, either upper or lower, can cause this type of problem. Invalid subscripts can modify the user's data storage areas or can even modify the program execution storage, old Professional Basic was renown for this type of problem, very difficult to track down. Perhaps Option Strict can be useful to pinpoint any of these types of errors. It will run slow but may identify the subscript error.

It is not a problem with array indexing that I am referring to.

I think I was one of the first cleaning the array access indexes (metatrader 5 has forced me to do so) and I think that I was one of the first ones warning that improper array elements addressing will cause problems in a new metatrader 4 (when using the strict directive in the beginning of beta tests was not necessary and when all code was compiled as if the "strict" directive was specified) so what I am talking about has nothing to do whatsoever with improper array elements addressing.

Improper arrays element addressing is a basic coding problem and I am not talking about coding problems of that type when I am telling that there is a bug with something related to metatrader and arrays

It is a problem with different treatment of fixed size arrays and dynamic arrays that are treated differently when they should be initialized. The first time you start such code it works OK. Any time frame change, symbol change or account change causes ex4 to "forget" to reinitialize the fixed size arrays

That is just another case of inconsistent "behavior" of the compiled code - ie a bug of a compiler that does not do the things the way as it should and no strict or ommition of strict directive changes what is happening in those cases

_____________________________

And I suspect that it is just the surface of the arrays problems - if fixed size arrays are not treated correctly (no arrays cleanup on deinitialize and initialize) just try to imagine what sort of problems can come if somene uses clases (which are, after all, nothing more than a fixed size arrays of variables and pointers to class elements, functions and procedures).

_____________________________

I hope this clarifies what is happening with arrays right now (current build I am using is build 604) and that it will help coders to stop looking for their own coding errors when they are making none. Metatrader was never know for reliable arrays handling (there were some infamous builds of the "old" metatrader 4 that were a complete mess regarding arrays) so this is just a traditional thing happening with metatrader again.

Looking at tradestation that has arrays that are 10 times more evolved than metatrader arrays (regarding the ease of use and realiability) I was expecting with this new metatrader to make that odds at least 5 to 1 not 10 to 1 as it was before. At a moment the relation could be only a 20 to 1 (in favor of tradestation, of course)

_____________________________

PPS: Here is a very, very simple code that will show exactly what is happening (or better said, what is NOT happening) with fixed size arrays when time frame, symbol or account are changed :

#property indicator_chart_window

int init() { return(0); }

int deinit() { return(0); }

double array[1][1];

int start()

{

if (array[0][0] != 999) { array[0][0] = 999; Comment("array initialized at : ",TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS)," to ",array[0][0]); }

return(0);

}
Reason: