Metatrader 4

Copy the file LogTrades.mqh into your MQL4 Include folder – you can find the folder in MetaTrader4 in File -> Open Data Folder.

In your Simple EA you have to do four things:

  1. Include LogTrader.mqh file into your EA using #include
  2. #include <LogTrades.mqh>
  3. Add command InitLog(“Your_File_Name.csv”); to OnInit() / init() function.
  4. Add command CloseLog(); to onDeinit() / deinit() function. .
  5. Add command LogTrades(); to the very beginning of OnTick() / start() function.
  6. LogTrades();

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!