dingmaotu / mql4-lib

MQL4/5 Foundation Library For Professional Developers
Apache License 2.0
547 stars 251 forks source link

Save and load Vector from disk #44

Open rotem443 opened 6 years ago

rotem443 commented 6 years ago

Hey, I'm using the Vector with customized class, is there any way to save and load the vector to the disk? Thanks

dingmaotu commented 6 years ago

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.

rotem443 commented 6 years ago

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)

dingmaotu commented 6 years ago

Hi, you can check out the serialization format supported in the mql4-lib:

  1. CSV file is the simplest, you can use CsvFile class in Util/File.mqh
  2. Format/Resp.mqh or Format/Json.mqh and save the result to a BinaryFile.

Json format is not production ready though.