CommunityPowerEA Parser Tester Log - MT5

Avatar
  • updated

Hello community,

I share a script in Python that parsing the log of "Strategy Tester" which exports it to Excel (CSV).

I had the problem of not being able to remove statistics from operations and some other data from when it tasted a strategy, so I decided to make this script.

This is just the beginning. There is a lot to do in the script. Missing many more options, such as Trailing Stop, errors, etc.


I decided in this first version, not to talk the errors in operations but in future it could be optional to export errors to Excel.

The script did it on a weekend and have a muucho to be optimized.


I invite any of the community that improves it.

I share a repository in Github where they could share ideas or here it would also be very beneficial for everyone.

https://github.com/ulises2k/communityPowerea_Parser_Testerlog

The use is very simple, they need python 3.8 that can be downloaded from:

https://www.python.org/downloads/

You should edit the file and modify this variable to fit your profile:

Image 1553

You can use Visual Studio Code to edit and test the script or any editor/debug you want from Python.

https://code.visualstudio.com/download

In Windows you can simply run the following command in "cmd.exe"

Image 1554

Then open the 20210705.csv file with Excel and can filter by column, for example create statistics.

Image 1555

It would be good to share ideas and formulas.

It occurs to me for example, add a more column where you can get the spread at the time of the operation. I think that at this time the script could not, but if I'm thinking about the next version.

I encourage everyone to improve this excellent EA

CommunityPowerEA_parser_testerlog.py

Avatar
Ulises Cune

It is no longer necessary to clean the entire log, now you can see the separation of each execution, 

Initial Deposit xxx- leverage 1:xxxx

CommunityPowerEA_parser_testerlog.py

CommunityPowerEA_convert_CSV_To_Excel.py

CommunityPowerEA_parser_testerlog_run.bat

Avatar
Ulises Cune

New Version support v2.35

More filtered logs:

  • Global TakeProfit
  • Anti-martingale
  • AutoHedge for CPEA version> = 2.35. Was added # before the letter H. Thank Andrey

Execute "CommunityPowerEA_parser_testerlog_run.bat"

CommunityPowerEA_parser_testerlog.py

CommunityPowerEA_convert_CSV_To_Excel.py

CommunityPowerEA_parser_testerlog_run.bat

Avatar
Ulises Cune

This version fixes a small bug with error log handling. It was disabled.

  • Now converts the file from CSV to Excel format, which allows the numbers and decimals not to be changed

Original CSV File:

CSV open with Excel

CSV to Excel:

CommunityPowerEA_parser_testerlog.py
CommunityPowerEA_convert_CSV_To_Excel.py
CommunityPowerEA_parser_testerlog_run.bat

Avatar
Ulises Cune

Hello Community

More filtered logs and more columns.

  • Added the column "NewValue" to know what the new price is
  • Added StopLoss / TakeProfit columns 
  • The "Pending entry" are detected 
  • The "StopLoss" are detected 
  • The "TrailingStop" value is detected


In this line you can select whether to take the log from the "Strategy Tester Visual" or not.


CommunityPowerEA_parser_testerlog.py

Avatar
Sai Pratap

Really appreciate ur time and efforts. Thanks mate.

Avatar
Ulises Cune
  • I rewrote almost the entire algorithm.
  • Delete 2 columns from excel that were repeated
  • Add the Ask / Bid columns

Now you can calculate the Spread at the time of the trade

Add a new column and subtract the prices

CommunityPowerEA_parser_testerlog.py