Download MetaTrader 5
To add comments, please log in or register
Order a robot or an indicator for MetaTrader. The Freelance service will help you!
Simphiwe Ncube
760
Simphiwe Ncube 2016.03.19 06:38 
Good day all. My questions regard virtual hosted MT4 and what I have access to. 1. Can I write to a file using an EA? 2. Can I retrieve that file? 3. If not, can I write to a journal and how do I retrieve that journal?
Marco vd Heijden
Moderator
4497
Marco vd Heijden 2016.03.19 08:57  
Documentation on MQL5: File Functions
Documentation on MQL5: File Functions
  • www.mql5.com
File Functions - Reference on algorithmic/automated trading language for MetaTrader 5
Simphiwe Ncube
760
Simphiwe Ncube 2016.03.19 10:14  
Thanks for the reply. I have a fair understanding of writing to and reading from files. What I want to do is write information to a file using an ea in MT4. The MT4 that I am referring to is hosted in mql5 virtual hosting. I then want to download that file to my PC. Can I do something like that?
Stuart Browne
5701
Stuart Browne 2016.03.19 11:03  
I don't believe you can, but happy to be corrected ;-)
Alain Verleyen
Moderator
30183
Alain Verleyen 2016.03.19 11:41  

1. Can I write to a file using an EA?

It should work, as I don't see anywhere it's not doable on Virtual Host. But I didn't test.

2. Can I retrieve that file?

By FTP ? Should also be tested.

3. If not, can I write to a journal and how do I retrieve that journal?

Yes you can write on Experts log, with Print() or printf() ... statements. The logs can the be synchronized.

Stuart Browne
5701
Stuart Browne 2016.03.19 15:22  
What directory/file would it be written to and how could you retrieve over FTP?
Marco vd Heijden
Moderator
4497
Marco vd Heijden 2016.03.19 16:39  

yes you can and it's not that difficult there are several ways to do it, it all depends on what you are trying to do.

I have done similar things you can just share the folder either over FTP or for example HFS

I usually use a vps server os (2012R2) that has all tools and services build in though but that depends on your choice of vps and skills.

Simphiwe Ncube
760
Simphiwe Ncube 2016.03.19 17:13  
Marco vd Heijden:

yes you can and it's not that difficult there are several ways to do it, it all depends on what you are trying to do.

I have done similar things you can just share the folder either over FTP or for example HFS

I usually use a vps server os (2012R2) that has all tools and services build in though but that depends on your choice of vps and skills.

I have done it on another VPS. I was specifically asking about the VPS offered by mql5.com
Alain Verleyen
Moderator
30183
Alain Verleyen 2016.03.19 17:21  
Marco vd Heijden:
...
Simphiwe Ncube:
...
The question is about Metaquotes virtual hosting service, not about traditional VPS.
Alain Verleyen
Moderator
30183
Alain Verleyen 2016.03.19 17:24  
Stuart Browne:
What directory/file would it be written to and how could you retrieve over FTP?

Write the file as usual and send it via SendFTP(). Obviously you then need access to an FTP server.

Marco vd Heijden
Moderator
4497
Marco vd Heijden 2016.03.19 17:24  

Im not sure if it supports remote desktop connections.

Maybe you can use

SendFTP()
Otherwise i think your possibilities are limited.
/ /12
To add comments, please log in or register