Libraries: Report - page 7

 

A new feature has been added. You can quickly share the results of backtests without lighting the EA.

For example, you can run such an Expert Advisor.

#define  REPORT_TESTER             // The tester will automatically record reports
#define  REPORT_TESTER_INPUTS      // The single pass report will show EA input parameters - requires DLL resolution.
// #define REPORT_TESTER_INVESTOR // Remove any mention of EA in the Tester pass-through.
#define  REPORT_INTERACTIVE_CHARTS // Adds interactive graphs to the report.
#define  REPORT_BROWSER            // Creating a report with browser startup - requires DLL permission.
#include <Report.mqh> // https://www.mql5.com/en/code/18801

#include <..\Experts\Examples\Moving Average\Moving Average.mq5>


At the end of a single run, an HTML report will open (if DLL is enabled) in the browser. There are two reports in the trailer - full and with a new feature: "investor".

You can provide any MT5-advisor with the same report in single runs (Hedge) in the same way as shown above - by writing some of the same lines at the beginning of the source.


If you have any comments, let me know.


The commission is also displayed in pips. This helps to estimate costs faster when setting up the Expert Advisor.

Files:
Example.zip  399 kb
 
fxsaber:

A new feature has been added. You can quickly share the results of backtests without lighting the EA.


If there are any comments, let me know.

Perhaps MagicNumber should be hidden as well.

 
Andrey Khatimlianskii:

Perhaps MagicNumber needs to be hidden as well.

Does MagicNumber in the Tester somehow obscure the EA? This comment is often used for identification, so I removed it.


ZЫ I removed magic numbers from the investor mode.

 
fxsaber:

Does Magic in Tester somehow spotlight the EA? Here is a comment often used for identification, so I removed it.

Yes, it can indirectly illuminate it. There have been cases of identifying an Expert Advisor even by the TF on which it was working (a chip from the developer).

 
Andrey Khatimlianskii:

Overall comfortable or not? I have an overly subjective view of this thing.

 
fxsaber:

Overall comfortable or not? I have an overly subjective view of this thing.

In general, yes. But, of course, I would modify it to suit myself if I were actively using it.

You can hide EA parameters under a spoiler, sometimes there are a lot of them.

 
Andrey Khatimlianskii:

In general, yes. But, of course, in case of active use I would modify it to suit myself.

I would be glad to hear your ideas for tweaking.

You can hide EA parameters under a spoiler, sometimes there are a lot of them.

I haven't figured out the spoiler yet. I wanted to put under the spoiler also the steutment itself, leaving only Summary and Average out of it. When there are thousands of positions, it is obviously unnecessary to show the status report without a spoiler.


By the way, input parameters are shown only in portable mode. I only use it myself, so I haven't even checked the "classic" mode.

 
fxsaber:

I haven't figured out the spoiler yet. I wanted to put the stats itself under it, leaving only Summary and Average out of it. When there are thousands of positions, it is obviously unnecessary to show the report without a spoiler.

Spoiler of a piece of table and just a spoiler are different things.

The usual one is implemented very simply:

<html>
<body>
        Обычный текст
        <details> Скрытый текст</details>
</body>
</html>


The whole table is hidden without problems:

<html>
<body>
        Обычный текст
        <details>
  <table border="1">
   <caption> Скрытая таблица</caption>
   <tr>
    <th> Россия</th>
    <th> Великобритания</th>
    <th> Европа</th>
    <th> Длина ступни, см</th>
   </tr>
   <tr><td> 34,5</td><td> 3,5</td><td> 36</td><td> 23</td></tr>
   <tr><td> 35,5</td><td> 4</td><td> 36?</td><td> 23–23,5</td></tr>
  </table>
</details>
</body>
</html>
 

If someone is using the library, they can use a quick comparison of single runs.

Run the desired single runs. After each one, an HTML report will open in the browser.

The Title field of each report contains a summary of the run results.

In the picture the reports are opened in IE. If you click on the icon, the list of reports open in it appears. In each line of this list you can see the characteristics of the reports.

It is convenient to navigate among them and compare. I have been using it for a long time.

 

Added.

#define  REPORT_TERMINAL_INPUTS    // The report will show the data of the Expert Advisor, from which the Report is called in the Terminal.