Metatrader 5 - Maximal amount of portable MT5 instances on one PC.

 

THE CASE DESCRIPTION

I am running a lot of MT5 instances on one PC in order to test all the EAs on demo accounts before they go live. Because I need more than one instance of MT5 terminal on one PC, I am running them in portable mode. I have noticed also, that the newer versions of MT5 are “heavier”, so I was successfully running MT5 build 2715 until yesterday…

First I have made a server at home from an old laptop with windows 10 and it could run 25 instances of MT5 build 2715, but it was running very hot hence very loud, so I have decided to purchase a new laptop with a home server in mind, so I have purchased quite a potent machine with amd ryzen 9 4900HS with 8 cores and 16 threads and 32 GB of RAM, and to my surprise I could run only 25 of MT5 build 2715 terminals at the same time, even though the hardware resources were almost unused. CPU was utilised in 15% and RAM in 30%, so there were more than enough head room to be used, but every time I would launch the 26th instance of MT5 build 2715 the system worked as if it would be crippled. I could not open any other window, would that be a file explorer or a totally new application or a “Open Data Folder” from MT5 File menu. The right click would be also unresponsive. It would be impossible for example use the right click in order to set the custom history period in the MT5 transaction history.

Everything would come back to normal though once I would close the 26th instance of MT5 build 2715.

Recently however my broker did not allow me to log in to my demo accounts, stating in the journal message, that my MT5 version were too old for me to log in, so I had to change all the instances to the newest MT5 version build 3552. With the same hardware mentioned above I was able to run simultaneously only 20 instances of MT5 3552(which is 5 instances less than with MT5 2715) even though the hardware didn’t have to work hard for it, because the resources usage was approximately the same as before, ample of head room left to play with. And the same situation repeated itself once I would open the 21st instance of the new MT5 3552. The system would go in to crippled mode with the right click not responding and no new windows opening.

My conclusion would be, that it is somehow resources bound, since the with the new versions we can clearly see that less instances work simultaneously, however the windows resource manager indicates, that it could go further… and yes, I know, that there are more and less demanding EAs out there, but in this case the set of EAs was exactly the same…

This case is important, because if the MT5 terminals do not need powerful hardware, because as we can see even a huge number of terminals working simultaneously is not able to utilise it all, which means that we do not have to spend more money for powerful VPS going with the weaker option instead...

QUESTIONS TO THE DEVELOPERS AND OTHERS WHO CAN HELP

1. Why is this happening?

2. Is the amount of simultaneous portable instances of MT5 somehow locked by the terminal itself or by the windows 10?

3. Can the amount of simultaneous portable instances working on one PC be increased with an MT5 update that you would develop or do I have to change something in the windows OS in order to increase it?

Please advise.

 
  • Why are you posting in the MT4 section when your question is about MT5?
  • Irrespective of it being a full installation or in portable mode, the technical limit set by the MetaTrader application is 32 terminals per computer session (please note the emphasis on "session").
  • In practice, due to how resources are configured on Windows, the limit can be less than 32. Usually the practical maximum it is between 24-28, depending on configuration. Even when using multiple user sessions, it may not be able to handle more than that without overloading the system, causing terminals to freeze.
 
Fernando Carreiro #:
  • Why are you posting in the MT4 section when your question is about MT5?
  • Irrespective of it being a full installation or in portable mode, the technical limit set by the MetaTrader application is 32 terminals per computer session (please note the emphasis on "session").
  • In practice, due to how resources are configured on Windows, the limit can be less than 32. Usually the practical maximum it is between 24-28, depending on configuration. Even when using multiple user sessions, it may not be able to handle more than that. It has to do with how the stack is managed on Windows.

thank you for your reply.

I am posting in the mt4 chapter as there is no dedicated space for mt5 issues.

so you are saying that the limit in mt5 is 32 terminals per computer session..? so why with the same hardware and the same EAs running on it the amount of working EA went down from 25 to 20 only by changing the mt5 build??

Clearly there is something that could be done in terms of coding, that could bring the amount of terminals per session back to 25 instances working simultaniusly. Maybe there could be an MT5 light version, which would be dedicated more towards the symultanious portable server operation.

I also couldn't stop to wonder what kind of hardware would be able to run 32 terminals at the same time if quite new and fast 8 core CPU with 32 GB of RAM can run only 20...??

 
tsunami80 #: I am posting in the mt4 chapter as there is no dedicated space for mt5 issues.

What are you talking about? You have the entire forum which is dedicated to MT5 and and MQL5 except for single section at the end for MT4. Your logic seems flawed.

tsunami80 #: so you are saying that the limit in mt5 is 32 terminals per computer session..? so why with the same hardware and the same EAs running on it the amount of working EA went down from 25 to 20 only by changing the mt5 build??

The technical limit is 32 terminals, not EAs.

Technically there is a maximum of 100 charts per terminal, which means a limit of 100 EAs per terminal. The practical limit, depends on how resource intensive the EAs are. If they are lean and efficient you can run more. If they are bloated and inefficient, then you are limited to less.

However, a newer build my consume more resources than a previous build, meaning a lower maximum limit.

tsunami80 #: Clearly there is something that could be done in terms of coding, that could bring the amount of terminals per session back to 25 instances working simultaniusly. Maybe there could be an MT5 light version, which would be dedicated more towards the symultanious portable server operation. I also couldn't stop to wonder what kind of hardware would be able to run 32 terminals at the same time if quite new and fast 8 core CPU with 32 GB of RAM can run only 20...??

True, but MetaTrader was not designed for users running their own "trading shop" for multiple customers. It was designed for normal retail traders.

For those that want to run "trading shop", they can license the back-end software from MetaQuotes.

And by the way, it is actually illegal in Europe and in many parts of the world to be running such a "trade shops" or for trading for others without a valid license to do so.

EDIT: Yes, I fully understand that this is only for running "demos" for testing, as you stated.

 
Fernando Carreiro #:

What are you talking about? You have the entire forum which is dedicated to MT5 and and MQL5 except for single section at the end for MT4. Your logic seems flawed.

The technical limit is 32 terminals, not EAs.

Technically there is a maximum of 100 charts per terminal, which means a limit of 100 EAs per terminal. The practical limit, depends on how resource intensive the EAs are. If they are lean and efficient you can run more. If they are bloated and inefficient, then you are limited to less.

However, a newer build my consume more resources than a previous build, meaning a lower maximum limit.

True, but MetaTrader was not designed for users running their own "trading shop" for multiple customers. It was designed for normal retail traders.

For those that want to run "trading shop", they can license the back-end software from MetaQuotes.

And by the way, it is actually illegal in Europe and in many parts of the world to be running such a "trade shops" or for trading for others without a valid license to do so.

And in Europe as well as in many parts fo the world you can have a police on your neck for false accusations.

good that I am NOT running any "trading shop" as you insinuate. Please reffere to the part of the case description, where I am actually explaining why I need so many demo accounts running symultaniusly.

 
tsunami80 #: And in Europe as well as in many parts fo the world you can have a police on your neck for false accusations. good that I am NOT running any "trading shop" as you insinuate. Please reffere to the part of the case description, where I am actually explaining why I need so many demo accounts running symultaniusly.

I did edit my post, but you did not see it in time ... "EDIT: Yes, I fully understand that this is only for running "demos" for testing, as you stated."

As for your "demo" tests, you don't need to run 1 EA, per 1 terminal, per 1 account. You can run multiple EAs (max 100), per the same demo account, on a single terminal.

But if your EAs are inefficient, you can still run say for example 15 EAs per terminal, on say 15 terminals, giving you 225 simultaneous tests. If you use unique magic numbers, you can easily create reports for each with some custom scripts for reporting.

 
Fernando Carreiro #:

I did edit my post, but you did not see it in time ... "EDIT: Yes, I fully understand that this is only for running "demos" for testing, as you stated."

As for your "demo" tests, you don't need to run 1 EA, per 1 terminal, per 1 account. You can run multiple EAs (max 100), per the same demo account, on a single terminal.

But if your EAs are inefficient, you can still run say for example 15 EAs per terminal, on say 15 terminals, giving you 225 simultaneous tests. If you use unique magic numbers, you can easily create reports for each with some custom scripts for reporting.

It will not do the job, becasue the EAs are optimized in such a way, that they can reach up to DD of 80% and still do well, therefore I need to test them long term before I run them on live accounts.

With such high potential DD it would be madness to put more than one EA on one mt5 terminal as the account would be blown once a month. I do not test the trading logic of the EAs but their optimized settings to verify if they are not overoptimized, if that meakes sense...  

 
tsunami80 #: It will not do the job, becasue the EAs are optimized in such a way, that they can reach up to DD of 80% and still do well, therefore I need to test them long term before I run them on live accounts. With such high potential DD it would be madness to put more than one EA on one mt5 terminal as the account would be blown once a month. I do not test the trading logic of the EAs but their optimized settings to verify if they are not overoptimized, if that meakes sense...  
Then there is not much that can be done, except for forward testing in the strategy tester with real tick data.
 
Moving topic to "General".
 
Fernando Carreiro #:
Then there is not much that can be done, except for forward testing in the strategy tester with real tick data.

and what about IOS platform? Will a different operating system (Apple) have available more possible connection, hence more terminals opened at the same time than windows?

 
tsunami80 #: and what about IOS platform? Will a different operating system (Apple) have available more possible connection, hence more terminals opened at the same time than windows?

Mobile devices cannot run MQL programs like EAs and custom indicators.

Mobile devices an only run one mobile terminal per MetaTrader platform.

iOS Apple store no longer offers MetaTrader terminal.

Reason: