Download MetaTrader 5
To add comments, please log in or register
Log in to MQL5.community using OpenID. It is convenient!
Michael
496
Michael 2016.09.06 01:39 

No problem with code or anything.  Just wondering here before I set off on an adventure (that will probably end in a horrific crash.  :)   )

Is there any hard and fast limitations on how many global variables that can be set? 

Keith Watford
Moderator
8016
Keith Watford 2016.09.06 02:13  

I don't know of any limitations.

When discussing global variables, please make it clear whether you are referring to globally declared variables or Global Variables of the client terminal.

Michael
496
Michael 2016.09.06 21:52  
GumRai:

I don't know of any limitations.

When discussing global variables, please make it clear whether you are referring to globally declared variables or Global Variables of the client terminal.

Good point.  Sorry.  I'm asking about the Global Variables of the client terminal.
Keith Watford
Moderator
8016
Keith Watford 2016.09.07 01:19  

I ran this in a script

  for(int x=0; x<10000; x++)
     GlobalVariableSet("GV"+IntegerToString(x),x);
  GlobalVariablesFlush();
  Print("Total GVs=",GlobalVariablesTotal());

It quite surprised me that it took 20 seconds to run the script, quite slow really.

Anyway, I got to over 120,000 GVs

/
To add comments, please log in or register