MetaTrader 4 Build 600 with Updated MQL4 Language and Market of Applications Released - page 39

 
apes001:

Hi:

I'm trying to find a way to handle the warning I'm getting for the piece of code provided. This "Lookup Filter" (found it here on this forum and it worked without any problems in the OLD builds), is being used numerous times (all over) in my EA. Are there any of you who may suggest some solution or a way to tackle this?

The warning I'm getting is: "Check operator precedence for possible error; use parentheses to clarify precedence"

I thank you very much



If you have "or" groups e.g. if(that and this||this && that); use a set of parenthesis,(), around each so that if(that and this||this && that); becomes

if((that && this)||(this and that));
 
Hello everyone,

Although everything should work that I've made in the past on the new update to MT4, I cannot guarantee it will. There are many people having problems.

My thoughts:

I do not like being forced to upgrade, and not even being asked about it or given a choice since its done automatically now without user intervention. It took me at least two days to track down why GMT time wasn't working, and news (FFCal) wasn't working, fix them in my AllPairs EA to work in new build, and I'm not done yet. GMT time and GMT offset are the only reasons I saw to upgrade because they are now functions of MT4. However, they are wrong, and if that's they only reason to update and I ended up having to use my old code and just rename the function to make it work instead of using MQL4 (since it gives wrong info for what I need and see as correct), then I have made a decision that for now, I will try to get my code to work in update, but I will also make sure it works in old version too. I will not implement any new functions of MQL4 at this time. I will also not have two sets of code to maintain.

The "update" to MT4 is actually MetaQuotes implementing MT5 into MT4 and calling it an update. There is a whole new learning curve and language and rules, etc. I will have to learn if I am to implement any of the new functions that MT4 now contains in build 600 or above. I am still on the fence on whether I will continue to code for MT4 or not. There are other platforms out there, and I'm a self-taught coder, so unless I can see where some thorough documentation that my think brain (read: numbskull) that my mind can wrap itself around, I MAY continue. Otherwise, since the pay is less than minimum wage (in my experience in the long run anyways - everybody wants something for nothing or cheap), there is no incentive.

Here you can read how to keep from upgrading, and downgrade if already upgraded:
<link removed by moderator>

Kindest regards,

Don
 
alexvd:
Thanks. It will be fixed soon.


Hi I have the latest build (604), but array copy still doesn't do what I think it should be doing. Here is the code again. Have I got something wrong?

Kind regards

mfp.

   // decalre arrays
   double i[][4];
   double j[][4];
   
   
   // Size and fill i[] with some data
   ArrayResize(i, 2);
   i[0][0] = 1;
   i[0][1] = 2;
   i[0][2] = 3;
   i[0][3] = 4;
   i[1][0] = 5;
   i[1][1] = 6;
   i[1][2] = 7;
   i[1][3] = 8;
   
   
   // resize array j[] - is this required?, cant find any documentation on this but experimentation seems to show it is not.   
   ArrayResize(j, 2);               
   
   
   // Copy from i to j , starting at 0 for both and copy the first 4 elements
   Print(ArrayCopy(j,i,0,0,4));     // Output: 2 - Surely 4 should be returned?
   Print(j[0][0]);                  // Output: 1 - ok
   Print(j[0][1]);                  // Output: 2 - ok
   Print(j[0][2]);                  // Output: 3 - ok
   Print(j[0][3]);                  // Output: 4 - ok
   Print(j[1][0]);                  // Output: 5 - wrong?
   Print(j[1][1]);                  // Output: 6 - wrong?
   Print(j[1][2]);                  // Output: 7 - wrong?
   Print(j[1][3]);                  // Output: 8 - wrong?
   

   // Populate i[] with new data
   i[1][0] = 9;
   i[1][1] = 10;
   i[1][2] = 11;
   i[1][3] = 12;


   // copy from i[] to j[], to the 5th element of j[] from the 5th element of i[]  for a count of 4 elements
   Print(ArrayCopy(j,i,4,4,4));        //2014.02.06 19:34:29.868        Access violation write to 0x06D86000 in 'C:\Users\.....'; ... and crash.
 
There is a whole new learning curve and language and rules, etc. I will have to learn if I am to implement any of the new functions that MT4 now contains in build 600 or above. I am still on the fence on whether I will continue to code for MT4 or not. There are other platforms out there, and I'm a self-taught coder, so unless I can see where some thorough documentation that my think brain (read: numbskull) that my mind can wrap itself around, I MAY continue. Otherwise, since the pay is less than minimum wage (in my experience in the long run anyways - everybody wants something for nothing or cheap), there is no incentive.

Here you can read how to keep from upgrading, and downgrade if already upgraded:
<link removed by moderator>

Kindest regards,

Don


angevoyageur said to me a while back, code in the old mql4 style unless you need the new functionality. I think that is good advice. There are only a few small changes to learn about if you take it that way.

 
is there anyway to use the new debugging features in the Strategy Tester?? Its of very little practical use debugging in live charts. Surely they asked developers and addressed this?
 
hamishd:
is there anyway to use the new debugging features in the Strategy Tester?? Its of very little practical use debugging in live charts. Surely they asked developers and addressed this?

Since simulating the incoming tick with the PostMessage is now considered as a hack, then your request seems quite legitimate.
 
SDC:


angevoyageur said to me a while back, code in the old mql4 style unless you need the new functionality. I think that is good advice. There are only a few small changes to learn about if you take it that way.


I am still waiting, then I hope I will have to only read the doc to find out whether the changes are bugs or features.
 
hamishd:
is there anyway to use the new debugging features in the Strategy Tester?? Its of very little practical use debugging in live charts. Surely they asked developers and addressed this?
It would be interesting but it's not possible. It has already been asked (for MT5) to implement this, but I never read a clear answer from MQ.
 
SDC:


angevoyageur said to me a while back, code in the old mql4 style unless you need the new functionality. I think that is good advice. There are only a few small changes to learn about if you take it that way.

I have to add that there are some changes in behaviour even in "old" mql4 that you have to take into account. See this topic : UnOfficial changes in function Behavior beween mql4_Built 509 vs mql4_Built 600+

The best approach in my opinion the following, I take example of an EA :

  • Use the old .ex4, compiled with 509 (maybe a good idea is to rename it using a suffix _509). And run this one to trade. The backward compatibility with old .ex4 seems excellent, though not 100%.
  • Work on a copy of the original .mq4 source code if you need to change your code and then to compile it with new build 6xx. Run it only on a demo account.
  • This way you can compare and check that the new compiled code was running fine under build 6xx.
 


Is there a (good) reason that MT4 build 600 is 32 bit rather than 64 bit?