Copy the file LogTrades.mqh into your MQL5 Include folder –
you can find the folder in MetaTrader5 in File -> Open Data Folder.
In your Simple EA you have to do four things:
- Include LogTrader.mqh file into your EA using #include
#include <LogTrades.mqh>
- Add command InitLog(“Your_File_Name.csv”); to OnInit() / init() function.
- Add command CloseLog(); to onDeinit() / deinit() function. .
- Add command LogTrades(); to the very beginning of OnTick() / start() function.
Good! now you are ready to test your strategy,
launch it in the Tester Setting Page
The trading results will then be exported to the path:
AppData/Roaming/MetaQuotes/Terminal/Common/Files/Your-File-Name.csv.
You can get to the tester folder using MetaTrader4 in File -> Open Data Folder
Upload your reports and enjoy!