Account History Exporter
- Utilities
- Yuriy Bykov
- Version: 1.24
- Updated: 23 January 2023
Performs export of the transaction history of the current trading account.
The file is saved in the data folder, which can be opened through the main menu of the terminal: File -> Open Data Directory (Ctrl+Shift+D) and go to folder MQL5/Files .
The file name is generated automatically or set manually through the script parameters.
The history file can be used to analyze the history in Excel (may need to be opened through the Import Wizard) or to simulate the same sequence of trades on another trade server using an Expert Advisor Simple History Receiver .
- Name for file : Specify a file name or leave the field blank to automatically generate a file name.
- Separators : set separators for data parts in CSV file (comma ',' or semicolon ';') and decimal point (period '.' or comma ',')
- Save file to Common Folder : If True, the file will be saved to the Common/Files folder.
- Copy file to FTP-Server : copy a file to the FTP server specified in the terminal settings
- Folder on FTP to export : Folder on the FTP server to export. Can be set in the terminal settings or in this parameter
- Export history every N minutes. 0 - don't use : export periodically after the number of minutes specified in this parameter. If it is 0, then the EA will export once and will be removed from the chart. If greater than 0, then the EA will export data with the specified period until it is manually removed from the chart.
File format
Heading comes first
DATE,TICKET,TYPE,SYMBOL,VOLUME,ENTRY,PRICE,STOPLOSS,TAKEPROFIT,PROFIT,COMMISSION,FEE,SWAP,MAGIC,COMMENT
After it and until the end of the file there are lines with comma-separated field values for one deal.
Field values per line:
- DATE - date in YYYY.MM.DD HH:MM:SS format
- TICKET - deal ticket (integer)
- TYPE - deal type from ENUM_DEAL_TYPE (integer)
- SYMBOL - trading instrument (string)
- VOLUME - deal volume (real number)
- ENTRY - deal type from ENUM_DEAL_ENTRY (integer)
- PRICE - transaction price (real number)
- STOPLOSS - Stop Loss level (real number)
- TAKEPROFIT - Take Profit level (real number)
- PROFIT - trade profit, for opening it is equal to 0 (real number)
- COMMISSION - commission amount (real number)
- FEE- fee amount (real number)
- SWAP- swap size (real number)
- MAGIC - number of the expert who made the deal
- COMMENT - comment
Does exactly what it is designed to do.