Download MetaTrader 5

FileOpen and edit other directories?

To add comments, please log in or register
nadiawicket
417
nadiawicket  
Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?
whroeder1
16764
whroeder1  
nadiawicket: Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?
Perhaps you should read the manual.

Note

For security reasons, work with files is strictly controlled in the MQL4 language. Files with which file operations are conducted using MQL4 means, cannot be outside the file sandbox.

FileOpen - File Functions - MQL4 Reference

Jose Francisco Casado Fernandez
4483
Jose Francisco Casado Fernandez  

You can open, read or write files only inside sandbox (MQL4/files or tester\files if you are in backtesting) due to security reasons.  If you want to manage files from / to other directories, you would have to use Windows API functions.


Regards.

nadiawicket
417
nadiawicket  
Jose Francisco Casado Fernandez:

You can open, read or write files only inside sandbox (MQL4/files or tester\files if you are in backtesting) due to security reasons.  If you want to manage files from / to other directories, you would have to use Windows API functions.


Regards

What are these? Where can I find these API Functions?
nadiawicket
417
nadiawicket  
whroeder1:
Perhaps you should read the manual.
Any info on these windows apis?
Carl Schreiber
Moderator
7813
Carl Schreiber  
nadiawicket:
Any info on these windows apis?

google for "mt4 WinApi CreateFileW"

There are some older articles (before b600) they aren't working anymore..

Drazen Penic
2719
Drazen Penic  
nadiawicket:
What are these? Where can I find these API Functions?


http://bfy.tw/CCgJ

nadiawicket
417
nadiawicket  
Drazen Penic:


http://bfy.tw/CCgJ

No thanks.

Was looking for more specific info.

Mladen Rakic
67685
Mladen Rakic  
nadiawicket:
Any info on these windows apis?

Do you think that if you have to ask what Windows API is, that someone can help you in a post or two?

Here : https://msdn.microsoft.com/en-us/library/windows/desktop/ff818516(v=vs.85).aspx (if you plan to have a holiday, scratch it :))

Carl Schreiber
Moderator
7813
Carl Schreiber  
nadiawicket:
Can I FileOpen and write other things in my computer or is it just the default /mql/files and the Common Folders that I can open and write to with an EA FileOpen?

An alternative would be place a junction of a folder with the files you want to work on in one of the folders of mt4's 'sandbox' e.g. ..\\Common\\Files.

Than you can use the mt4 file function just naturally :)

nadiawicket
417
nadiawicket  
Can, after thorough testing for the last week, state that for Debian Lilnux its just better to just FileOpen and FileDelete functions instead of messing with file writes, period. its glitching like hell with the filewrites in debian stretch using latest wine, at least in my experience/case.
To add comments, please log in or register