EA "Freezing" on MT4

 

Hi All, I have various different EA's that run very successfully on most occasions. It appears that the EA freezes or stops calculating values to setup trades. If I remove the EA and re-add it, it does what I want it do immediately, therefore I know it isn't a bug in the code and as I mentioned it works perfectly 99% of the time.

Has anyone experienced a similar issue and if so what type of resolution is there for it?


Thanks

Gary

 
GaryBebington:

Hi All, I have various different EA's that run very successfully on most occasions. It appears that the EA freezes or stops calculating values to setup trades. If I remove the EA and re-add it, it does what I want it do immediately, therefore I know it isn't a bug in the code and as I mentioned it works perfectly 99% of the time.

Has anyone experienced a similar issue and if so what type of resolution is there for it?


Thanks

Gary

What you said doesn't allow to say "it isn't a bug in the code". An EA can work 99% of the time and still have bugs. That's the most probable.

It can also be an MT4 issue eventually. You will have to investigate and check your code.

 
Alain Verleyen:

What you said doesn't allow to say "it isn't a bug in the code". An EA can work 99% of the time and still have bugs. That's the most probable.

It can also be an MT4 issue eventually. You will have to investigate and check your code.

Hi Alain, I have run the same EA on two different accounts. The one did exactly as I expected and the other didn't. The parameters were exactly the same. I also created a very simple EA that just alerted and I picked up similar issues. I'm absolutely certain there must be something that causes it to do this. I have also debugged the code under all known conditions and never have a problem when in debug mode. It only occurs very periodically. 


It's possible there is a command that clears memory or something...maybe someone knows.


Thanks once again

 
GaryBebington:

Hi Alain, I have run the same EA on two different accounts. The one did exactly as I expected and the other didn't. The parameters were exactly the same. I also created a very simple EA that just alerted and I picked up similar issues. I'm absolutely certain there must be something that causes it to do this. I have also debugged the code under all known conditions and never have a problem when in debug mode. It only occurs very periodically. 


It's possible there is a command that clears memory or something...maybe someone knows.


Thanks once again

There is no miracle solution, the only way is to find the cause. Two different accounts means different data and different trading parameters, maybe your code didn't manage well all possibilities.

 
Alain Verleyen:

There is no miracle solution, the only way is to find the cause. Two different accounts means different data and different trading parameters, maybe your code didn't manage well all possibilities.

 

Hello everyone:

Just open the "Open Data Folder" menu of Metatrader in the "File" menu, then get in the "config" folder and delete all files there. See the bellow image.
This problem should be solved.


Reason: