MetaTrader 4 Build 574 with Updated MQL4 Language and Market of Applications Released - page 38

 
forexgeeker:

Some interesting discovery I´ve just made: you can only launch 32 MT4 instances of this new build system wide!

I have copied the terminals to different paths (the oldschool way) to still be able to start as many as I want (all in portable mode of course).

Boy was I wrong: the terminal seems to check how many other terminal.exe are running in memory on the system and you can only launch a maximum of 32 instances system wide, even if they are launched from different paths and renaming the terminal.exe also won´t help! Launching more than 32 instances simply won´t work and the terminal simply won´t open again even from another path.

With build 509 I was able to open as many instances as I wanted. I hope MQ can remove this limitation? What is it good for at all? I have a 16 CPU core machine with 32GB of RAM and I often have up to 50 terminals open for optimization reasons, also to make full use of the machines power and because MT4 only uses 1 CPU core at a time that was a very efficient way with build 509 and previous builds. This was never a problem and I don´t get it why MQ would add a 32 instances system-wide limit even if the terminals are launched from different paths - seems like a pretty strange limitation that really helps no one and just limits those with big machines!

Grml :(


That sad news.

Here are just some ideas (that I haven't try),

1. Launch every single MT using Run (Click Start > Run ( + R)), but I think MT will kill it self, though.

2. Using sandbox software, but I think this is slow (been there before).

3. Create several user accounts and run MT on each one of them by switching user. Just make sure that the internet connection is keep alive when using switching user (got to do with some registry hacking). This is what I think guess/assume works. Problem is not to log off on each user account, instead select switching user.

Good luck, and if you try this, please let's us know the result.


 
onewithzachy:

Here are just some ideas (that I haven't try),

... or 4) try renaming each copy of terminal.exe to something unique such as terminal1.exe, terminal2.exe etc. It's probably doing the check by counting the number of instances of terminal.exe on the process list.
 
gchrmt4:
... or 4) try renaming each copy of terminal.exe to something unique such as terminal1.exe, terminal2.exe etc. It's probably doing the check by counting the number of instances of terminal.exe on the process list.

I thought you're already doing that and that does not works ?

forexgeeker:

...

Boy was I wrong: the terminal seems to check how many other terminal.exe are running in memory on the system and you can only launch a maximum of 32 instances system wide, even if they are launched from different paths and renaming the terminal.exe also won´t help! Launching more than 32 instances simply won´t work and the terminal simply won´t open again even from another path.

...

 
onewithzachy:

I thought you're already doing that and that does not works ?

You're right, I'd missed that. (Not me who posted the query.)

In which case, the next-most-likely way of it doing the count is enumerating the number of top-level MT4 windows. If so, your suggestion 3) would then work.
 
gchrmt4:
You're right, I'd missed that. (Not me who posted the query.)

In which case, the next-most-likely way of it doing the count is enumerating the number of top-level MT4 windows. If so, your suggestion 3) would then work.

I think so, simply because Windows "thinks" that those other MTs are running for different user.


 
Nope, it doesn´t. Tried it, it´s system wide limit, regardless if on different user accounts, regardless if EXE is renamed, regardless whatever. Of course running in a Virtual Machine it works, but what the heck, this is slow and the solution would be so easy to just remove that check! Hope MQ removes this, this is terrible. I wouldn´t mind if MT4 would finally support multi-threading, but with just usage of 1 core and then limiting this ancient platform to just 32 instances with nowadays power machines is really ugly. Especially since that limit didn´t exist in previous builds and I don´t get what it is good for at all except to dictate something more to the end user and show how powerful MQ is or something.
 
Alabarce:
No works well NormalizeDouble ()
And randomly displays a string of 15 decimal, instead of showing just 1 decimal.
NormalizeDouble is irrelevant. You are converting a double (result from ND) to a string and that is the problem. Use DoubleToStr(). Don't use NormalizeDouble.
 

It is an error NormalizeDouble function that randomly fails and returns 15 decimal and does not return normalized with the number of decimal places indicated.

I copied what the MQL4 Reference Manual, StringConcatenate makes the transformation and returns a String:

StringConcatenate

The function returns the string formed by concatenation of parameters transformed into string type.

string StringConcatenate(
void argument1 // first parameter of any simple type
void argument2 // second parameter of any simple type
... // next parameter of any simple type
);

Parameters

argumentN

[in] Any comma separated values. From 2 to 63 parameters of any simple type.

Return Value

Returns the string, formed by concatenation of parameters transformed into string type. Parameters are transformed into strings according to the same rules as in Print() and Comment().

Note

Parameters can be of any type. Number of parameters can't be less than 2 or more than 64.

 
Alabarce:

It is an error NormalizeDouble function...

From what you just copy-pasted, you are wrong. You have no idea (neither I have) how the double is transformed into a string. But I have very clean view, that NormalizeDouble works as expected.
 
Previously (Version 509 and above), had never seen that problem.
FuncionStringConcatenate works well and can bind different types of data.
But I have encountered a problem, and I have documented graphically.
Transforms a string that he has, and in this case are strings of decimal 15, when it should have been always one decimal.
In my code, I'm actually doing StringConcatenate (Array [] ...) of indexes of the array which had saved NormalizeDouble (OrderProfit (), 1);
Reason: