barnacle7: Is there away to constantly back up those values calculated somewhere so that if the MT4 Terminal is unexpectedly closed the EA can retrieve those values ?
- Persistent storage. Write them to a file, read the file OnInit.
- Or recalculate the values on startup.
double arrays[n]; void Calculating(int i){ array[0] = Close[i]; : } OnTick(){ Calculating(0); : } OnInit(){ for(int i=Bars-1; i>0; i--) Calculating(i); :
Another option, depending on your needs, are global variables. However, they do have some shortcomings.
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
When using arrays or Static variables which are calculating values needed to be kept for processing in an EA,
Is there away to constantly back up those values calculated somewhere so that if the MT4 Terminal is unexpectedly closed the EA can retrieve those values ?
Any links where I can read more on it would be helpful.
Thanks