MetaTrader 5 crashes when it connects to a server

 

For those who are unfamiliar with MetaTrader 5, it is an application used for the purpose of executing financial trade. It has its own programming language, MQL5, and a strong community that creates tools for the analysis of financial data. See link for more info:  https://www.metatrader5.com/en

The problem that I'm running to is that the application, when started will connect to a server and immediately shut down. I know for certain that  the issue occurs when it connects to a server because:

  1. Disconnecting from the network will keep the application open indefinitely
  2. Deleting any demo accounts will keep the application open indefinitely

I am unable to view the log of the event as the application shuts down before it has time to record the event in the log. It logs in the connection but not the source of the error.

I've tried to do the following:

  1. Reinstalled MetaTrader 4 and Metatrader 5
  2. White listed the application and closed the firewall before running the application
  3. Opened the application under compatibility mode and administrator mode.
  4. I've tried looking online at the forums for any similar issues that have occured for the other users but no solutions where offered.

Here's the related posts I've gathered thus far:

Maybe I missed something. BTW Meta Trader works fine on my linux machine and other machines I come across. Does anyone have any ideas of solutions?

 
280921:

For those who are unfamiliar with MetaTrader 5, it is an application used for the purpose of executing financial trade. It has its own programming language, MQL5, and a strong community that creates tools for the analysis of financial data. See link for more info:  https://www.metatrader5.com/en

The problem that I'm running to is that the application, when started will connect to a server and immediately shut down. I know for certain that  the issue occurs when it connects to a server because:

  1. Disconnecting from the network will keep the application open indefinitely
  2. Deleting any demo accounts will keep the application open indefinitely

I am unable to view the log of the event as the application shuts down before it has time to record the event in the log. It logs in the connection but not the source of the error.

I've tried to do the following:

  1. Reinstalled MetaTrader 4 and Metatrader 5
  2. White listed the application and closed the firewall before running the application
  3. Opened the application under compatibility mode and administrator mode.
  4. I've tried looking online at the forums for any similar issues that have occured for the other users but no solutions where offered.

Here's the related posts I've gathered thus far:

Maybe I missed something. BTW Meta Trader works fine on my linux machine and other machines I come across. Does anyone have any ideas of solutions?

Why MT4 ? Is that happening too with MT4 ?

What build are you using ? Is it 32 or 64 bits ?

 

What if you try to delete the setting files in \Config\ systematically:

  1. save all first
  2. delete one by one the .ini  and .dat files
  3. start the terminal
  4. see what happens.
 
@Carl Schreiber I tried your suggestion and deleted the .ini and .dat files one by one. I have noticed that deleting the accounts.dat file deletes my account and keeps the terminal open but creating a new account will shut it down when the new account connects to the server. 
Carl Schreiber
Carl Schreiber
  • www.mql5.com
Added topic Debugging disabled (EA, included mqh are in the right place!!) How do I motivate the Strategy-Tester again to debug my program? While I was debugging the Editor suddenly wasn't re-acting any more (everything was greyed) and I closed the debug-window, the editor and the terminal - after the restart of the America is dwarfing itself...
 
Alain Verleyen:

Why MT4 ? Is that happening too with MT4 ?

What build are you using ? Is it 32 or 64 bits ?

Yes, strangely enough, it is happening to both MT4 and MT5, the terminal shuts down as soon as it extablishes connection to a server on both platforms. I'll try running it in 32 bit mode as I've been running it solely in 64 bit thus far.
 
280921:
Yes, strangely enough, it is happening to both MT4 and MT5, the terminal shuts down as soon as it extablishes connection to a server on both platforms. I'll try running it in 32 bit mode as I've been running it solely in 64 bit thus far.

No need to check 32 bits if it's 64 bits computer. MT4 is 32 bits anyway.

I would suggest you to check your Windows log (event viewer) and your antivirus/firewall.

 
Do you have a debugger running? Metatrader is allergic to those.
 
Drazen Penic:
Do you have a debugger running? Metatrader is allergic to those.
I do have rStudio open, didn't seem to make a diffence when it was closed before but I'll close it and see if that works.