0

I have an mt4 account hosted on a VPS of mql5 community. I have it setup such that it'll write the history of trades on a csv every OnDeInit() [FileWrite function used].

While the Home Computer is on, it will monitor the trades. The VPS EA will also monitor the trades. When I turn the Home Computer off, it cannot monitor the trades. The VPS EA will continue to monitor the trades. When I turn the Home Computer back on, it'll resume monitoring but the data created will contain gaps because of the time it was turned off. The VPS EA will have non-gapping data.

How do I download this non-gapping data? I know how to upload and synch from my HomeComputer to the VPS, but I can't seem to download (filewritten csv) and synch from the VPS to my HomeComputer.

Is there any way to achieve this? All I really want is to collect the history of trades without any gap. Is there any workound?

  • not clear what you need, what kind of monitoring you are doing etc. If you need to collect history of closed deals - that should not be a problem, just record last known ticket when off, then read that data when switching on and collect all history using OrderSelect(i,SELECT_BY_POS,MODE_HISTORY) after that ticket – Daniel Kniaz Jan 22 '18 at 10:23
  • That can't be the case since my trade history is limited to about a few trades. I already asked my broker and they explained to me that it was the limit of their version of mt4. So, what I did was make a code snippet that would manually collect the closed trades into an array. Now, the problem is with vps. The vps will be able to collect the array 24-hours but my home computer cant. Therefore, i need a way to download that array into my computer in case i need to change EA parameters (which will basically blank out the array and the data will have to start over again) – Robert Simon Uy Jan 22 '18 at 14:29
  • write each deal in file, or write and extend that file with every written deal, after closing ea, it will close the file and you can download it from \MQL4\Files folder on your vps – Daniel Kniaz Jan 22 '18 at 15:57

0 Answers0