Tell me, how can I implement saving and reading a CSV file to the location I specified, and not to the Files folder of MT5 itself, or when using the FILE_COMMON flag to a shared folder?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
marketeer
For example, so:
Forum on trading, automated trading systems and testing of trading strategies
Mounting volumes to subfolders of MetaTrader 5
yu-sha, 2011.08.12 13:18
The problem is solved by means of Windows 7. It seems that in Vista you can do the same.
No solution found for Windows XP.
1) By the commandConnect a network drive from the context menu of the iconNetwork connect a network resource (shared folder, ftp,…) and assign it a drive letter, for example, Y:
2) In the command line with Administrator rights:
– go to the terminal folder from which you want to access the remote storage
– run the command mklink /d. localfolder Y:, where localfolder is the name of the local folder, Y is the connected network drive
This creates a symbolic link to a network resource and makes its contents available to the terminal and the editor.
P.S.
You can do without network drives by directly connecting a network folder
mklink /d .localfolder “computersharedfolder”
In general, the search will still give a lot of things.
progman
Avatar )))
integer
That absolutely necessary just there to mess about in the file where it is? An exception may be the rarest unique case when the file cannot be moved for some reason. But what this case is, I can’t even think of. All the same, while working with the file, access to it by other programs should be blocked. With copying even better, the blocking period is reduced to the scanty time required to copy the file.
miron_like
can I have more details please?
marketeer
This question was already understood. It is enough to make a link to an external folder inside the Files folder. Look for mklink (windows command).
vdev
trader781
Why csv? It is terribly inconvenient to read
barabashkakvn
To copy to the MQL5 sandbox, you can use the WinAPI copyfilew function. And then use the standard MQL5 file functions to work with the file. After processing, apply copyfilew again.
integer
Copy it to your terminal folder, where you can use mql functions
miron_like
MQL can only work with the files or common folder.
There are two directories (with subdirectories) where working files can be located:
Programmatically, you can get the names of these directories using the terminalinfostring () function, using the ENUM_TERMINAL_INFO_STRING enumeration:
// - - - Folder where terminal data is stored
string terminal_data_path=terminalinfostring(TERMINAL_DATA_PATH);
/ / - - - Shared folder of all client terminals
string common_data_path=terminalinfostring(TERMINAL_COMMONDATA_PATH);
Work with files from other directories is stopped.
Therefore, standard methods cannot be used.
vdev
You can create it via the win api, and copy it too. But how then to work with it by means of MQL, I do not know something?
integer
search
You can simply use the Win API function to copy the file, and then use MQL to work with it.