Discussion of article "Custom presentation of trading history and creation of report diagrams"
In the archives attached to the article there are no instructions on file location and trading history, for which examples were given in the current article!
In the archives attached to the article there are no instructions on file location and trading history, for which examples were given in the current article!
Yes, you are right, the archive was shortened. The history is in the appendix, and as an instruction:
Transfer the folder from the archive without changes to the scripts. In this folder the project where all the described files will be located. When starting the project, you will be prompted to select:
1) Path to the attached trading history (it must be on your computer).
2) Folder for uploading the results of the attached history
3) Folder for uploading the results of your own history.
These folders should be different, as the script generates uploads with the same names and they will simply replace each other if the folder is the same. If for some reason you do not have input parameters when starting the script, then change the parameters in the script itself (file Get_TradingHistory.mq5).
In the archives attached to the article there are no instructions on the location of files and trading history, for which examples were given in the current article!
The archive with the files attached to the article has been replaced. The file for testing the script is located in the MQL5/Files/article_4803 folder .
Tried running the script.
Here is the result
2018.09.01 18:17:58.442 Get_TradingHistory (Si-9.18,M1) Failed FindFirstFile ("C:\MQL5 test_1 to save the report") with error: 2 2018.09.01 18:18:06.008 Get_TradingHistory (Si-9.18,M1) Abnormal termination 2018.09.01 18:18:06.172 Get_TradingHistory (Si-9.18,M1) Error CopyFile C:\MQL5 тест сохранения истории\dealHistory.csv to C:\Users\***\AppData\Roaming\MetaQuotes\Terminal\Common\Files\temp.csv 2018.09.01 18:18:06.172 Get_TradingHistory (Si-9.18,M1) An error occurred while test_3 ! 2018.09.01 18:18:06.172 Get_TradingHistory (Si-9.18,M1) An error occurred while test_4 ! 2018.09.01 18:18:06.177 Get_TradingHistory (Si-9.18,M1) An error occurred while test_11 ! 2018.09.01 18:18:23.346 Get_TradingHistory (Si-9.18,M1) zero divide in 'DealHistoryGetter.mqh' (432,60)
MT5 in portable mode works.
And I don't quite understand, does the script know how to work with history, or does it need to prepare a history file according to special rules?
Tried running the script.
Here's the result
You have an error with file paths or file creation and reading permissions. Try going through it line by line. When I did the test, I saved all the data on the C drive and the file with the test history was located the same way, maybe you don't have write or read permissions.
You have an error with file paths or file creation and reading permissions. Try to go through it line by line. When I did the test, I saved all the data on the C drive and the file with the test history I had the same way, maybe you do not have write or read permissions.
I have all the rights.
How to prepare the history file for the script?
I have all the licences.
How to prepare a history file for the script?
The test class can read and load it (a separate method in the test class is written for this purpose). You just need to pass the path to the test file.
I have all the licences.
How to prepare a history file for the script?
Go through line by line and tell me at which of the stages you get an error ?
It is ready test class knows how to read and load it (a separate method in the test class is written for this). You just need to pass the path to the test file.
Perhaps I'm not explaining it in the right way, the file "dealHistory.csv" was downloaded with the archive, it already contains data, I understand that the report will be built on them. How can I make the report build on my data?
Go through line by line and tell me at which of the steps you get the error ?
How do I do that? I don't quite understand the terminology.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Custom presentation of trading history and creation of report diagrams has been published:
The article describes custom methods for assessing the trading history. Two classes have been written for downloading and analyzing history. The first of them collects the trading history and represents it as a summary table. The second one deals with statistics: it calculates a number of variables and builds charts for a more efficient evaluation of trading results.
The core piece of any trading activity is the trading algorithm which forms the Profit/Loss curve. Such an algorithm can be compared with a synthetic asset, the value of which is formed relative to the underlying asset (i.e. the traded instrument). For example, in options trading the Black-Scholes model formula is used for calculating such a synthetic asset based on the underlying asset price. But there is no such formula for a trading algorithm. Accordingly, launch of an algorithm can be compared to a long position of a synthetic symbol, the PL curve of which is formed by the algorithm's programmed logic. Profit formed by this "asset" can be unstable in different time periods. Even if it can be evaluated by some econometric model, this model cannot be unified. But how to track this asset and our trading stages? One of the suitable solutions is to monitor the algorithm trading retrospective and detect deviations from expected results.
I will not give advice on how to analyze algorithms, but will only provide a set of methods, which allow the presentation of the complete picture of your trading history. Based on data obtained, you will be able to build complex econometric models, calculate probability characteristics and make various conclusions.
This article will be divided into 2 chapters. In the first (technical) part, I will describe methods for generating trading reports based on the bulk of information, which is stored in your terminals. This chapter deals with the source data used for analysis. In the second part, we will deal with the main values, by which we will evaluate the trading retrospective on the selected data. Data sampling can be varied: all assets or a selected symbol, for the entire available history or for a certain period of time. The analysis results will be presented in a separate file and briefly visualized in the terminal.
I used data from my real trading history for the analysis examples. Code implementation examples were prepared using a testing period, which I intentionally accumulated by trading on a demo account.
Author: Andrey Azatskiy