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
  • 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

Avatar
Sai Pratap

Really appreciate ur time and efforts. Thanks mate.

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
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

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

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
Andrey Khatimlianskyi

Cool!

Please, share the results of your analysis, if any.

Avatar
Ulises Cune

Hello,

After a long time, I upload a new version of this script that parses the CommunityPower log and exports it to Excel to be able to see in detail the operations carried out, filter data and create statistical graphs with Excel.

It is not complete, but a large part of the "Expert Log" is analyzed.

Script en Python 3

CommunityPowerEA_parser_testerlog.py

You must have Python 3 installed

You must edit the file CommunityPowerEA_parser_testerlog.py and modify DATA_FOLDER

Run (open cmd.exe and write this):

c:\Python310\python.exe CommunityPowerEA_parser_testerlog.py -mt5_visual_mode_checked off


Parameter:

-mt5_visual_mode_checked off

-mt5_visual_mode_checked on


Example Result (Default Set):

20220528-141106.xlsx
20220528-141106.csv

Avatar
shinnsohai

Cool, this will be beneficial for us to analyze through PowerBI or Tableau.

Not sure if I can add a wish of Capturing the set file's parameters to the subsequent sheet as well.

Avatar
Ulises Cune
Quote from shinnsohai

Cool, this will be beneficial for us to analyze through PowerBI or Tableau.

Not sure if I can add a wish of Capturing the set file's parameters to the subsequent sheet as well.

yes, sure, tell me