mql4-lib
mql4-lib copied to clipboard
Save and load Vector from disk
Hey, I'm using the Vector with customized class, is there any way to save and load the vector to the disk? Thanks
Thanks for your interest. Currently there is no systematic way to serialize objects to disk. You have to do it by yourself. In the future, this might be added to the framework.
Thanks for your interest. Currently there is no systematic way to serialize objects to disk. You have to do it by yourself. In the future, this might be added to the framework.
Thanks for the fast response. What is the best way you can think about for implementing this for now?
(this is my problem - https://www.mql5.com/en/forum/291484#comment_9467524)
Hi, you can check out the serialization format supported in the mql4-lib:
- CSV file is the simplest, you can use CsvFile class in Util/File.mqh
- Format/Resp.mqh or Format/Json.mqh and save the result to a BinaryFile.
Json format is not production ready though.