Join our fan page
Report - library for MetaTrader 5
- Views:
- 5869
- Rating:
- Published:
- 2017.11.03 11:52
- Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This library is a revised version of an excellent script released in 2006, adjusted with modern MQL possibilities in mind. Some features have been removed, and new features have been added.
In both platforms (MetaTrader 4/5), you can run the following script to save a report (in the form of MetaTrader 4):
#include <Report.mqh> void OnStart() { REPORT::ToFile("Report.htm"); }
and see a generated HTML report in the resulting file:
It can be especially useful in MetaTrader 5, which does not provide visual HTML reports like MetaTrader 4 (as of the time of publication).
Additional possibilities of the library in MetaTrader 5
-
Output of balance graph on the chart.
#include <Report.mqh> void OnStart() { REPORT::ToChart(); // Output of balance graph on the chart }
-
Automatic saving of reports in the tester at the end of a single test and during optimization.
At the end of a single run in the tester, the library can automatically save a report on testing results of any Expert Advisor. Add to the EA source code the following lines:
#define REPORT_TESTER // Reports will be automatically written in the tester #include <Report.mqh>
The same lines will enable saving of reports of each optimization run.
It allows you to immediately evaluate results without waiting for the optimization completion. After the end of optimization, you will not need to launch separate tests and wait for results. It allows you to visually evaluate all results calculated by the optimizer. Balance graphs (PNG files) of multiple separate runs can be shown on one chart as thumbnails.
Note
In MetaTrader 5, the library uses the MetaTrader 4Orders library.
To add balance charts and input values to reports in the optimization mode, you need to register the TypeToBytes library.
#include <TypeToBytes.mqh> // https://www.mql5.com/en/code/16280 #define REPORT_TESTER // Reports will be automatically written in the tester #include <Report.mqh>
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/18801
An Expert Advisor without a single indicator. Uses lot and step increase.
AlexSTAL_ZigZagProf_channelA channel based on peaks and troughs of AlexSTAL_ZigZagProf.
The script saves current chart settings to a template with the specified name.
TesterBenchmarkMeasuring the net performance of MetaTrader 4/5 strategy testers.