MT5 Cant open and My PC Freezes when i try to open more then 21 Terminals

 

Hello, I have to open as many MT5 terminals as possible but for some reason when I tried to open the 23-rd MT5 terminal it just can't - There is no error or something like that. The window just refreshes himself and nothing is happening. At some point - sometimes the windows is becoming unresponsive. I tried to open the 23-rd terminal on 5 different computers and every time was unsuccessful. I have to mention that the configurations are different and we don't have a lack of usage of the CPU or RAM. The RAM 16GB stays below 40% And the CPU is below 15%.

So basically I believe this is because of the Windows but I'm not sure what exactly is causing the problem. 

Please if anyone has any ideas just share your opinions thoughts etc. I read about something that windows limit the sockets when a terminal opens or something like that but i am not really totally sure.

 

Issue with running multiple MT4 instances (advice on VPS Spec) - forum thread

Forum on trading, automated trading systems and testing trading strategies

Issue with running multiple MT4 instances (advice on VPS Spec)

Sergey Golubev, 2020.09.05 07:21

I was running 21 MT4 instances but it was expensive dedicated server (expensive for monthly cost).
I think - it is impossible to run 20 on VPS, and it is not related to RAM only. As I remember (it was many years ago) - it may be related tosome kind of frequency (PnP OS, or Resources Controlled, or IRQ, ...). So, it should be computer anyway for 20 Metatrader instances.

Forum on trading, automated trading systems and testing trading strategies

I Ran Two Instances of Metatrader And It Worked Fine

William Roeder, 2020.04.24 21:49

As long as they are installed in different directories, Maximum number of terminals is 32 per machine. For more you have to use virtual machines.
          Max Number of Running Systems on MT4 - Trading Systems - MQL5 programming forum - Page 2 2015.07.03
          Ability to run more than 32 terminals through certain options - MQL5 programming forum 2019.06.28
          How to open two MT4 with the same broker at the same time? - MT4 - MQL5 programming forum 2020.04.03

I run 68 charts × (1 EA + 5 Indicators) in one terminal on my laptop (plus browser, email, and uTorrent.) So unless your EA/indicators are extremely CPU intensive (rewrite them,) ten (10) times that amount shouldn't be a problem.


As for charts, currently:

  1. MT4: ninety-nine charts per:
              Chart Opening - Working with Charts - MetaTrader 4 Help
    But CHARTS_MAX is 100 MT4 build 1170.
              List of changes in MetaTrader 5 Client Terminal builds - MQL5 programming forum #1 № 4 2009.11.25
  2. MT5:
    Constant Description Value
    CHARTS_MAX The maximum possible number of simultaneously open charts in the terminal 100
              Constants, Enumerations and Structures / Named Constants / Other Constants - Reference on algorithmic/automated trading language for MetaTrader 5

But soon: 1000 symbols limitation in marketwatch - MQL5 programming forum #2:
          New version of the MetaTrader 5 build 2360 platform: Extending SQLite integration - page 19 #182 2020.04.13



Issue with running multiple MT4 instances (advice on VPS Spec)
Issue with running multiple MT4 instances (advice on VPS Spec)
  • 2020.09.04
  • www.mql5.com
Hi all, I'm currently in the process of trying to get 20 MT4 clients running on my VPS...
 
Stan: I have to open as many MT5 terminals as possible

MT4: Maximum number of terminals is 32 per machine. For more you have to use virtual machines.
          Ability to run more than 32 terminals through certain options - MQL5 programming forum (2019)

MT5: Max 18.
          How many MT5 terminals can i run? - General - MQL5 programming forum #2 (20.08.13)
MT5: Max 28.
          Multiple MT5 terminal instances in VPS - stopped with 10053 - MT5 - General - MQL5 programming forum (20.09.13)
MT5: Max 10.
          Bug report: Error when running multiple MT5 terminals - General - MQL5 programming forum (2022)

 
Yes so basically i tried to resolve the problem but it came a little bit more complicated so i left everything. 

The solution i came up with: Multiple virtual Machines that can run up to 20 MT5 platforms at one - As William Roeder said above. I think this is the cleanest and the most simple solution to that problem. 
 

Forum on trading, automated trading systems and testing trading strategies

Maximum number of MT5 instances per VM

Renat Fatkhullin , 2021.04.11 21:18

They explained.

Windows has a monstrous almost uncorrectable jamb with graphic handles in the current session. There are very few of them, and this is still dragging on with Windows 3.1.

To increase the number of available handles, you need to increase the size of the heap in the [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Windows] registry:

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,20480,768 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16

на

%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection= 1024,65536,65536 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=sxssrv,4 ProfileControl=Off MaxRequestThreads=16

Please note that this cannot be done on 32 bits and on small physical memory sizes (do not even try to do this on < 16 Gb of memory). We put this on> 64 Gb RAM.

If you make these changes on weak computers, you can get an unbootable operating system.


 

When you use Docker, you can run as many as your RAM allows. I have a ready to use solution. If you are interested, PM me here.

Reason: