Please don't use this section to post about coding.
Topic moved to appropriate section.
If the data in memory really matters, you need to save them in all cases, using a VPS is irrelevant.
Using static or dynamic "allocation method" is also irrelevant.
Saving the data to the disk looks like the best option here - I'm assuming the data is produced by the EA under very specific conditions and cannot be fetched by regular MQL5 functions, like iClose, CopyClose, etc. Only the data written to the disk can be restored after a system/terminal shutdown, because all memory is freed after MT5 is restarted.
Using a VPS just to make sure the data is always available looks like an overkill solution to me.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone.
1. Dynamically allocated arrays, objects and instances of classes may hold important data.
2. Reloading the system or bot for any reason causes interruption and loss of those data.
How do you fix this issue?
I would be grateful to hear how you handle this: