Job finished
Specification
Requirement
This exercise is just for data analysis. A method is required to extract the data for open positions on a terminal at regular intervals.
Create a CSV file and copy that file to a cloud location, such as a dropbox folder.
There are multiple terminals. Most are demo installations on a Windows 10 desktop. A few others are on a Brokers vps server.
I have assumed that a single instance of any new utility will run on each terminal.
Frequency of extract
The frequency of the intervals for creating the file should be a parameter that can be altered. Initially, this may be five minutes but could change. A user interface is not required on the assumption that it will be pretty easy to edit that item in whatever utility is provided.
No file should be created if there is no trading taking place on the terminal.
File name
Each file name should use the login ID and time created as the file name, therefore a series of files will be created. E.g. 50667481220609173047
220609 | 173047 | |
MT5 Login | date | time |
File creation
File to contain values under the standard column headings from the trade terminal:
Symbol, ticket, time[Entry], type, volume, price[entry], SL, TP, Price[current], Value, Swap, Profit, Magic, Comment. Entries in [] brackets are my own clarifications, no doubt these fields have different names in the MT5 database.
There needs to be two extra columns in addition to the standard ones used by MT5,
A column should be added with the time of the file creation. This column allows a time based analysis of the individual open positions.
A column should be added for the terminal login (not the hashed number created by MT5 for the data folder!)
The order of the columns is not important if an existing function provides it in a different sequence.
e.g. Just copied from the trade terminal but with the new time created column added.
Write the file to a cloud location such as a Dropbox folder.
Conclusion
I guess that there may be a few ways to do this and there may be constraints that I don't know about, which is why I have not gone into more detail. The way that you might approach this could alter the design quite a lot.
Let me know what else you need.
Thanks,
Ian