If you want to "save" consider saving/reading a file.
mittalpa wrote >>
Hi
Is there a way to save an array in Global Variables? I don't think MT4 has that ability.
Any alternatives to access a Global (alike) array by multiple EAs?
Thanks
Pankaj
Hi
Is there a way to save an array in Global Variables? I don't think MT4 has that ability.
Any alternatives to access a Global (alike) array by multiple EAs?
Thanks
Pankaj
I wrote a library to do this. However it is a little overcomplicated. Anyway you can write one value in one global variable plus some index, so you may handle array in this way.
#define GlobalDiv "." // Write data structure into 'name' global variable bool WriteGlobal(string name, double value, int param1=0, int param2=0, string s="") { string id=StringConcatenate(name,GlobalDiv,param1,GlobalDiv,param2,GlobalDiv,s); return(GlobalVariableSet(id, value)>0); }
Reading is a little more tricky if you add string...
Hope this helps.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is there a way to save an array in Global Variables? I don't think MT4 has that ability.
Any alternatives to access a Global (alike) array by multiple EAs?
Thanks
Pankaj