Add a feature to export trading data from strategy tester to csv for data analysis purposes

Avatar
  • updated
  • Under review

I know that Metatrader has this feature. However, the data is not complete enough to carry out the analysis. We need the data behind the reason why the trade was opened or closed. Because of that, I think it would be better if we add information on the value of each indicator used (eg ATR, stochastic, TDI, etc.) into the csv file. With this data we can analyze the trading results data to look for patterns from each big drawdown of the strategy we make

Avatar
0
Andrey Khatimlianskyi
  • Under review

Not sure Excel is better place for analyze. How will you use it?

Avatar
0
Ifan

I will do clustering analysis using orange data mining (orangedatamining.com). It usually use excel or csv files.

Avatar
0
Andrey Khatimlianskyi

I guess you need raw data — prices, indicators values, etc. You don't need backtest results.

Avatar
1
Ulises Cune

Hello, this weekend I was working on something similar, which is to parser the logs of the CPEA Tester and pass it to EXCEL (CSV) to be able to filter the columns and know better how our strategy works.
I already have a version that parses the signals when it opens the trades, the closing signals and I am ending the TrailingStop.

I think this would help the whole community to improve strategies and learn more about each feature of CPEA.

This week I would be publishing the script in Python, which if it is not too complicated for me, I will make a graphical interface so that everyone can use it easily.

I will publish it in a separate link with help and a small user manual.

I leave an example of the tester log and how it is converted to Excel (CSV).

I await some feedback or comment.

20210705_parseado.zip

20210705.zip
Avatar
0
Ifan
Quote from Ulises Cune

Hello, this weekend I was working on something similar, which is to parser the logs of the CPEA Tester and pass it to EXCEL (CSV) to be able to filter the columns and know better how our strategy works.
I already have a version that parses the signals when it opens the trades, the closing signals and I am ending the TrailingStop.

I think this would help the whole community to improve strategies and learn more about each feature of CPEA.

This week I would be publishing the script in Python, which if it is not too complicated for me, I will make a graphical interface so that everyone can use it easily.

I will publish it in a separate link with help and a small user manual.

I leave an example of the tester log and how it is converted to Excel (CSV).

I await some feedback or comment.

20210705_parseado.zip

20210705.zip

Very nice Ulises, thank you. That's very helpful.

Avatar
0
Ifan
Quote from Andrey Khatimlianskyi

I guess you need raw data — prices, indicators values, etc. You don't need backtest results.

I don't think it's necessary to use a csv file. But it would be better if you add a description of the value in each indicator used.

For example:

Signal to open sell #1 at 1811.38 (Stochastic K + IdentifyTrend + TDI)!

Also write the value of stochastic, Identity, and tdi values when the signal is given to the logs

Avatar
0
Ulises Cune

I'm sorry but I didn't understand you very well.
This line appears in the "Strategy Tester" log.

Signal to open sell #1 at 1811.38 (Stochastic K + IdentifyTrend + TDI)!

Check out this script that I made that has more information, I think that's what you need.

https://communitypowerea.userecho.com/en/communities/7/topics/376-communitypowerea-parser-tester-log-mt5


I still need to detect some more lines of logs and export them to CSV

Avatar
0
Ifan
Quote from Ulises Cune

I'm sorry but I didn't understand you very well.
This line appears in the "Strategy Tester" log.

Signal to open sell #1 at 1811.38 (Stochastic K + IdentifyTrend + TDI)!

Check out this script that I made that has more information, I think that's what you need.

https://communitypowerea.userecho.com/en/communities/7/topics/376-communitypowerea-parser-tester-log-mt5


I still need to detect some more lines of logs and export them to CSV

I mean each indicator value used, not the indicator name.
For example I use stochastic. The log can write the current %K and %D variable values of the stochastic when the trade is opened. the same as other indicators used

Avatar
0
Ulises Cune

Perhaps a Debug or Verbose mode with the True / False option could be created so that the values of the indicators appear in the logs when an order is opened.

@Andrey Khatimlianskyi

Avatar
0
Andrey Khatimlianskyi

Guys, this is the wrong way.

There is no point in analyzing EA signals. You should export raw data (prices) and analyze it. All indicators are price based. All signals are price based. You take 1% of the available information and try to analyze it.

Once again, this is the wrong way.