Libraries: Report - page 5

 
fxsaber:

It is good that it is not loaded, because the archive contains files from MT5, which are required to run on MT4.

And how can it be harmful even if the archive is deployed in MQL5? Let it be a cross-platform library (which it is).

 
Andrey Khatimlianskii:

And how can it harm, even if you deploy the archive in MQL5? Let it be a cross-platform library (which it is).

The automatic QB-check will not let it in. MT4Orders is used there for the five.

The library itself is in one file only - Report.mqh.

I don't quite understand why the CustomReport script's default location in KB might be necessary. If there is some interesting use case, let me know.

 
fxsaber:

The automatic QB check won't let in. There MT4Orders is also used for the five.

The library itself is in one file only - Report.mqh.

I don't quite understand why the CustomReport script should be located in KB. If there is some interesting use case, let me know.

Roger. Haven't posted code in a while, haven't come across any validation.

The script is simple - install the library in the terminal in one go.

 
Andrey Khatimlianskii:

Got it. Haven't posted codes in a while, haven't come across the check.

The script is simple - install the library in the terminal in one move.

Only CustomReport is not a library, but a script based on it. I think, if it is interesting for someone, it is only for MT4 and certain brokers. And MT5-KB will not be installed in MT4. That's why zip. It can be easily transferred.

 

One library application scenario came as a bit of a surprise. Since it was not foreseen at all and was born in the course of the play.


When you put an Expert Advisor on a chart, a backtest report to the current fresh data is opened at once. This allows you to see at once (a look at the charts determines a lot in a second) what and how the Expert Advisor with the given input parameters "traded". And in case of some random error in the input parameters, quickly identify it.


This is the most demanded application of Report.mqh for me. As it turned out, getting a fresh backtest when running an Expert Advisor is very convenient!

I don't recommend the library itself, but this scenario of running an EA - yes. It is completely different than just running an EA on a chart.
 

Is possible generate report on chart calculating profits and loss of the week, day and month?

i desire generate a report by day, is possible?

tks for the sharing

 
Rodrigo Silva:

Is possible generate report on chart calculating profits and loss of the week, day and month?

i desire generate a report by day, is possible?

CustomReport.zip

 
So I added 

#define REPORT_TESTER 

#include <Report.mqh>

to my EA, downloaded and made available for Report.mqh MT4Orders.mqh file (also tried with the latest version of it)

 then run an optimization for All symbols in MarketWatch balance max finally run the Report.mq5 script

and the result was a file with account name, datetime, initial deposit but no info  on the optimization results (all zeros)

Am I missing something? What can I try to make it work properly?


Thanks in Advance 

Files:
Report.jpg  206 kb
 
orgut:
So I added 

#define REPORT_TESTER 

#include <Report.mqh>

to my EA, downloaded and made available for Report.mqh MT4Orders.mqh file (also tried with the latest version of it)

 then run an optimization for All symbols in MarketWatch balance max finally run the Report.mq5 script

This mode has a bug.

and the result was a file with account name, datetime, initial deposit but no info  on the optimization results (all zeros)

Am I missing something? What can I try to make it work properly?

Try another Optimization mode.

 
fxsaber:

This mode has a bug.

Try another Optimization mode.

I knew something was going on... I've been trying to write on file the count sum of all profitable trades across all marketwatch pairs but it seems OnTesterPass doesn't get called in this mode, the thing is the other modes are for parameter optimization of a single symbol so they are of no use to me, this was the last resort   Do you know of any way to acomplish this? 

(I tried updating a Tester global variable inside OnTester() and Ondeinit() since are the only instances where I can use TesterStatistics( STAT_PROFIT_TRADES) to get the number I want for a single pass so I can add to the TGlobalVariable, tried writting directly to file from both of them to a similar effect updating the file, and tried the same aproaches inside OnTradeTransaction() all of wich work except for this Optimization Mode wich to the extent of my research is the only Mode for automatically testing several symbols in the same instance as for getting the sum of all profitable trades) any advice? my EA is not multicurrency nor self-optimizing so no use of input parameters

Any guide/thought will be appreciated ANYTHING 



Thanks