Compiling an EA in Build 600 creates havoc with a totally unrelated EA running on a different chart.

 

I have been running an EA successfully on build 600 since Feb. 3. I have been doing some diagnosing and testing of a totally different EA down below in the strategy tester area. Whenever I compile an EA down there, totally unrelated to the EA that is on the chart, the EA on the chart goes beserk, and opens up a series of about 10 trades, all around the same price, in a way that is totally inconsistent and even impossible given the trading logic of the EA on the chart. I thought I was hallucinating the first time it happened, so I closed the extra trades, and the EA was working fine again, like it had been for 2 days. But then I recompiled a different EA in the strategy tester area, and the EA up above went beserk again, and opened up a string of about 10 totally random trades. I have tried this 3 times, and it only happens when I compile another EA in the same platform.

Also, am having some issues with existing EAs not working exactly like they did in previous builds. It is beginning to feel like the Twilight Zone. I think there are some serious problems here in build 600.

 
jbrunet:

I have been running an EA successfully on build 600 since Feb. 3. I have been doing some diagnosing and testing of a totally different EA down below in the strategy tester area. Whenever I compile an EA down there, totally unrelated to the EA that is on the chart, the EA on the chart goes beserk, and opens up a series of about 10 trades, all around the same price, in a way that is totally inconsistent and even impossible given the trading logic of the EA on the chart. I thought I was hallucinating the first time it happened, so I closed the extra trades, and the EA was working fine again, like it had been for 2 days. But then I recompiled a different EA in the strategy tester area, and the EA up above went beserk again, and opened up a string of about 10 totally random trades. I have tried this 3 times, and it only happens when I compile another EA in the same platform.

Also, am having some issues with existing EAs not working exactly like they did in previous builds. It is beginning to feel like the Twilight Zone. I think there are some serious problems here in build 600.

Do-not use your live environment for building and testing.
 
jbrunet:

I have been running an EA successfully on build 600 since Feb. 3. I have been doing some diagnosing and testing of a totally different EA down below in the strategy tester area. Whenever I compile an EA down there, totally unrelated to the EA that is on the chart, the EA on the chart goes beserk, and opens up a series of about 10 trades, all around the same price, in a way that is totally inconsistent and even impossible given the trading logic of the EA on the chart. I thought I was hallucinating the first time it happened, so I closed the extra trades, and the EA was working fine again, like it had been for 2 days. But then I recompiled a different EA in the strategy tester area, and the EA up above went beserk again, and opened up a string of about 10 totally random trades. I have tried this 3 times, and it only happens when I compile another EA in the same platform.

Also, am having some issues with existing EAs not working exactly like they did in previous builds. It is beginning to feel like the Twilight Zone. I think there are some serious problems here in build 600.

Can you give some clues on how to reproduce this problem ?
 
ubzen:
Do-not use your live environment for building and testing.


Your point is taken. However, it is a demo account, so I was not worried about anything live. Plus, I used to work on my demo platforms all the time, without this issue. So at this point, I am more concerned about what would cause an issue like this, rather than whether or not I should or should not have been compiling an EA on the same platform that was running a demo forward test.
 
angevoyageur:
Can you give some clues on how to reproduce this problem ?


I was on an IBFX demo platform that used to be running build 509, but when I downloaded an installed build 600 on my computer, it forced this platform to be upgraded the next time I restarted it. There was nothing special that I did, so it should be easy to reproduce:

1. Place an EA on a chart, preferably one that will open orders fairly regularly, instead of once month or so. (as it turns out, it should be an EA compiled under build 600 - see my further remarks below.) In my case, it was a grid trading EA. Let it run for a while, so that 1 or 2 orders are open.

2. Open the strategy tester, and choose a completely different EA, and different currency pair. Click on the "Modify Expert" button, and make a small modification, even something cosmetic. Then click on the compile button from within the MQL4 build 600 editor.

3. Look at the terminal above the strategy tester and see what has happened to the trades in your terminal. In my case, in the IBFX platform, every time I compile, I get about 10 trades added. I have reproduced this 3 times.

I will say this... I tried a different platform with a different broker, that had upgraded to build 600, and put the same EA on the chart in that other platform. However, this EA had been compiled under build 509, and the problem did not duplicate when I compiled a different EA. So then, I compiled the EA that had been running on the platform in the build 600 terminal, and placed it on the chart. So now, the EA on the chart was compiled under version 600 instead of 509. I then did the same thing; I went to the strategy tester and opened a different EA and made a tiny change, and then clicked on the compile button. I quickly switched my view to the platform, and watched in disbelief as a new order immediately opened in the terminal. This new order was more than 65 pips away from where the next trade should have opened, according to the logic of the EA that was running. It was not 10 orders, like in the other platform, it was just one order in this platform. But I now have been able to reproduce the basic problem in 2 different platforms, with 2 different broker feeds.

*** I just looked closer and can see more of what happens. When I compile a different EA below in the strategy tester area, the displayed text on the chart above disappears, so it appears that the EA on the chart (which is a different EA) is re-starting. There is nothing I did to tell it to restart. All I did was compile a different EA. And even at that, normally when I restart this EA, it does not open up any additional trades, unless it is time for it to do so. But in this case, when I am compiling, the EA appears to be restarting, and then, once the comments on the chart appear, a new trade or trades open up, all at the wrong opening price.

 
jbrunet:


I was on an IBFX demo platform that used to be running build 509, but when I downloaded an installed build 600 on my computer, it forced this platform to be upgraded the next time I restarted it. There was nothing special that I did, so it should be easy to reproduce:

1. Place an EA on a chart, preferably one that will open orders fairly regularly, instead of once month or so. (as it turns out, it should be an EA compiled under build 600 - see my further remarks below.) In my case, it was a grid trading EA. Let it run for a while, so that 1 or 2 orders are open.

2. Open the strategy tester, and choose a completely different EA, and different currency pair. Click on the "Modify Expert" button, and make a small modification, even something cosmetic. Then click on the compile button from within the MQL4 build 600 editor.

3. Look at the terminal above the strategy tester and see what has happened to the trades in your terminal. In my case, in the IBFX platform, every time I compile, I get about 10 trades added. I have reproduced this 3 times.

I will say this... I tried a different platform with a different broker, that had upgraded to build 600, and put the same EA on the chart in that other platform. However, this EA had been compiled under build 509, and the problem did not duplicate when I compiled a different EA. So then, I compiled the EA that had been running on the platform in the build 600 terminal, and placed it on the chart. So now, the EA on the chart was compiled under version 600 instead of 509. I then did the same thing; I went to the strategy tester and opened a different EA and made a tiny change, and then clicked on the compile button. I quickly switched my view to the platform, and watched in disbelief as a new order immediately opened in the terminal. This new order was more than 65 pips away from where the next trade should have opened, according to the logic of the EA that was running. It was not 10 orders, like in the other platform, it was just one order in this platform. But I now have been able to reproduce the basic problem in 2 different platforms, with 2 different broker feeds.

*** I just looked closer and can see more of what happens. When I compile a different EA below in the strategy tester area, the displayed text on the chart above disappears, so it appears that the EA on the chart (which is a different EA) is re-starting. There is nothing I did to tell it to restart. All I did was compile a different EA. And even at that, normally when I restart this EA, it does not open up any additional trades, unless it is time for it to do so. But in this case, when I am compiling, the EA appears to be restarting, and then, once the comments on the chart appear, a new trade or trades open up, all at the wrong opening price.

Can I suggest you to report this to ServiceDesk (on mql5.com), it's directly with developers.
 
angevoyageur:
Can I suggest you to report this to ServiceDesk (on mql5.com), it's directly with developers.


Thank you. I did not know of that option. I have now submitted it to the service desk at MQL5, and will be waiting to hear back from the developers concerning this.
 
jbrunet:

Thank you. I did not know of that option. I have now submitted it to the service desk at MQL5, and will be waiting to hear back from the developers concerning this.
Ok, let me informed please.
 
angevoyageur:
Ok, let me informed please.

I have not heard back from the service desk as of yet, but I can report some further insights into this problem as I have been working on it.


The basic problem, in my opinion, is that the compiling of an EA causes the EA on the chart to restart, but to do so in some strange way that does not run all of the functions I need to have run before it gets to the order opening logic. I went into the EA on the chart, and added some logic to not allow a new trade to open if a certain variable is equal to 0. By doing that, now I can compile a different EA, and the EA on the chart no longer opens any new trades at the time of the compile and at the wrong prices.


However, I can still see that the EA on the chart does restart whenever I compile, because when I compile a different EA, the chart comments disappear, and a few seconds later, they reappear on the chart, just the same as what happens when I first start the EA after loading it on the chart. I don't think this should be happening as a result of compiling a different EA. And it could certainly lead others to have problems such as I was having before I put the extra code in to keep the unwanted orders from opening.

Reason: