I've noticed that very rarely when internet connection falls for a few seconds/minutes, after it is back online MT4 DOES NOT reconnect properly. What happens is that the top triangle at the bottom right of MT4 comes back green, but the bottom one remains red. In the journal tab (log) the following error can be seen: 'account number' DataCenter connecting failed . From this point on IsConnected() returns true BUT actually MT4 is disconnected. EA stops running, although new ticks come in and the graph seems to be normal. The solution is to relogin to the same account. Both triangles turn green and EA continues normally.
Now my question is what to do about it? How to solve this problem?
How do I detect this situation programatically? How do I solve it programatically? I know I can just relogin manually but thats not a solution. I'm looking for an automated solution to what seems like a MT4 bug. Alternatively, how do I avoid such situations?
This is quite a critical problem... Although rare (I've only run into this situation twice in 4-5 months), but it effectively disables the EA without any way of automatically and programatically detecting it... Please help.
I've just had the same problem. I've never seen this before so I don't know what the solution is.
I'm guessing that since it is a Sunday today, the broker's server is offline for some maintenance perhaps?
I am getting the below error message on my MT4 platform journal tab after I log in successfully.
I am trying to use a signal from MT4.
How can I correct this to get signal updates and simultaneous signal matching?
DataCenter connecting failed
Any ideas/thoughts will help...
Please do not dredge up a 4 year old post to ask a question which has no relevance to the original subject of the thread.
Signal queries/questions are handled on the mql5 forum, please post your question there.
Here was the only solution that worked for me:
Replace the "server.ini" file with a copy from an MT4 that IS working, from the *same broker*.
(This file is located in the "config" folder).
(This could be from a backup-copy of your MT4, or another instance of MT4. Or just re-install MT4).
10 years later the same issue is still happening :( forced move to MT5
What issue? Bottom triangle remaining red is not an issue. How to Fix Annoying MT4
connection problems (5 Ways)
Don't resurrect six (6) year old threads without a very good reason.
Dear William, clearly you didnt read @gordon issue or you haven't experienced it, the link you sent promoting ea-coder has newbies issues and solutions.
The datacenter lost connection is a serious issue for EAs running on VPS, it has happened to me a couple of times randomly this year making loses with orders opened out of the EA control until my intervention, mt4 remained disconnected forcing me to reconnect manually. To port the EA to MT5 isn't the fastest solution.
When my broker didn't do anything to reproduce the issue or try to fix it I researched and had the same luck of @gordon.
Then I got a workaround through https://www.fxblue.com/appstore/7/mt4-auto-restart if restarting mt4 doesn't fix the issue they offer a second layer of protection through another account monitor app to check broker connectivity issues and alert by SMS/Email/push from the same machine or a from a different machine so I can reconnect manually as fast as possible.
I don't work for FxBlue but these are the only solution's not programatically but at least automatically I've found so far.
He said the bottom stayed red. That is not a problem.
You said "10 years later the same issue is still happening, forced move to MT5 " Connections problem has nothing to do with MT4, and you will still have the same problem with MT5.
I have occasional disconnect/reconnect. Takes 30 seconds. I haven't seen non-broker re-connection problem for almost a decade.
Get a better broker.
If you have an EA running 24/7 and it stops due to a disconnection with the broker even if there's 100mbps connection, the issue is mt4 doesn't always auto reconnect and randomly stays disconnected.
If FXblue developed that tool its because the issue is more frequent than what you may think, even switching broker