Detailed description and samples for Superior Optimization Report
This description is out there in Russian.
Optimizing buying and selling methods in Meta Dealer 5 (MT5)? Use a complicated and extra visible illustration of optimization outcomes with the advantages of interactive HTML pages.
Briefly about the advantages:
- Filters by any criterion and threshold (min/max).
- Simple-to-read and perceive graphs.
- 43 optimization standards as an alternative of 8. The whole lot that’s recorded in .choose information is out there.
- You probably have entry to the EA code, you possibly can add stability and fairness charts for every cross and 38 {custom} optimization standards (Sharpe ratios, Sortino ratios, mathematical expectation in pips, normal deviation, and extra. You possibly can add custom-programmed standards).
This report ought to be seen by anybody who optimizes buying and selling methods.
Samples:
- Exhibits all 43 optimization standards accessible within the .choose file – Open
- The identical report with a further code that provides mini-charts for stability and fairness, in addition to 38 further optimization standards (Sharpe ratios, Sortino ratios, mathematical expectations in pips, normal deviation, and extra. You possibly can add custom-programmed standards) – Open
- Optimization with a ahead take a look at and saving of charts for the Transferring Common Skilled Advisor from the directions for including features to avoid wasting charts and statistics to any Skilled Advisor – Open
For extra data:
Filters:
MT5 has solely 5 filters for particular thresholds:

Within the “Superior Optimization Report“, you possibly can apply filters to all parameters and standards. You possibly can apply >= and/or <= (min, max) to every parameter, and whenever you enter a worth and press Enter or lose give attention to the enter subject, the end result desk will likely be rebuilt, the graphs will likely be redrawn, and the statistics (min, max, avg, and median) will likely be recalculated. Solely the remaining rows will likely be used within the new calculation.

Sorting:
Any column will be sorted. To do that, click on on its identify. Within the screenshot above, the column is sorted by Restoration issue. Repeated clicks change the sorting order (ascending/descending). The sorted column is highlighted in coloration.
Filtering/hiding rows:
- Extra sorting/filtering: In the event you click on the “Present sorting/filtering buttons” button on the backside of the web page, the [F] buttons will seem within the desk header. In the event you click on the [F] button in any column, the primary row will likely be taken as the utmost within the column, and solely rows which are lower than the earlier values in that column will likely be displayed. The remaining rows will likely be hidden. In the event you click on once more, the rows with values better than the earlier ones will likely be displayed. That is demonstrated within the screenshot above. In the event you click on a 3rd time, the filter will likely be eliminated.
This sorting/filtering will be accomplished on a number of columns on the identical time. - In the event you click on on the “Conceal Rows” button, the [-] buttons will seem within the Go column for every row. Clicking on these buttons will cover the rows. To indicate all rows once more, click on on the “Present All Rows” button.
Whenever you reload the report, all hidden rows will reappear. - In the event you click on the Present Passes button, two textual content packing containers will seem. The Present passes field exhibits all of the passes that stay within the desk after making use of filters and manually eradicating rows. After getting an inventory of one of the best passes, you possibly can copy and paste it into the Choose Passes field. You possibly can then take away all of the filters, however the rows within the Choose Passes field will likely be highlighted in blue. In the event you click on the “Present solely chosen” button, solely the chosen rows will likely be displayed, and you’ll additional filter them as wanted. It can save you the checklist to a textual content file and think about it once more whenever you open the report by pasting it into the Choose Passes field.
1D graphs
The graphs for the optimized parameters have been made extra user-friendly.
For instance, let’s optimize and evaluate the Restoration issue report graphs.
| MT5 | Superior Optimization Report |
| Exhibits values spaced out alongside the x-axis, i.e. individually. It’s tough to check strains which are 100-1000 pixels away from one another. | Exhibits all strains on the identical graph in the identical scale, however in numerous colours, to allow them to be distinguished from one another and in contrast. |
| ![]() The dotted strains of the common values present that the SL worth of 200 (the darkish inexperienced line) is one of the best on common, as it’s the highest. Its most worth can be larger. There could also be instances the place the worth with the best most doesn’t have one of the best common, attributable to a single sharp outlier. On this case, you might want to resolve what’s extra necessary to you. |
![]() It’s harder to find out which one is healthier. | The averages for Step 100 and 200 are virtually the identical. It’s attainable that 100 is healthier, as 200 has two separate outliers. With out them, the common can be decrease. On this instance, 100 additionally has two outliers, however there could also be instances the place the outliers are actually remoted. |
| The precise alignment of the strains is instantly noticeable. The unfold parameter has no affect on the end result, and it may be excluded from future optimizations. Or, quite the opposite, discover in a wider vary, for instance as much as 100. To check a report with such parameters, it’s higher to take away them, leaving just one choice, which can cut back the variety of rows by an element of 4. In the event you go away all of the choices, the report can have 4 equivalent rows that may intervene along with your work. To depart just one choice, you might want to apply a filter from and to one of many values, for instance, set min = 5 and max = 5. |
![]() | ![]() |
Options:
- The typical worth of every line is proven as a dotted line of the identical coloration. The utmost or minimal values are usually not all the time one of the best. The typical will present you the way a lot one parameter worth is usually higher than the others. Select what’s most necessary to you. The analysis device is supplied.
- To view particular parameter values intimately, you possibly can filter them. For instance, you possibly can choose SL above 100 or under 1000, or between 100 and 500, and the graphs will likely be redrawn to indicate solely the chosen values. Others will not hassle you. That is particularly handy in case you have greater than 10 totally different values.
MT5 doesn’t present this function.All SL choices SL from 100 to 500 

- Equally, you possibly can apply filters to any criterion.
For instance, revenue is bigger than 1000, there are greater than 100 trades, and the drawdown is lower than 10%. That is very handy.

All SL choices The revenue is greater than 1000,
the trades are greater than 100
and the drawdown is lower than 10%

- In MT5, you possibly can solely view the optimized parameters one after the other. Right here, you possibly can view all of them directly, which can be handy for evaluation.

The sizes of the graphs will be modified. Within the screenshot, the width has been modified from 300 to 140 pixels. - Whenever you load the graphs, they show the revenue on the Y-axis. You possibly can show any analysis criterion by sorting the graphs by the specified column.
An necessary distinction between these graphs and MT5 is that if the parameter being optimized is an enumeration (enum), MT5 shows its ordinal quantity (e.g., 1,2,3,4,5,6,7,8,9), which makes it tough to find out the precise worth (5,10,20,50,70,100,200,500,1000). These enumerations are helpful for proportional modifications in values, reminiscent of SL/TP.
If after 10, it’s rational to examine the worth of 20, then after 500, it’s foolish to examine 510,520… optimization with a step of 10 from 10 to 1000 will take 10+ instances longer than by enumeration. “Superior Optimization Report” exhibits the precise worth, not its ordinal quantity. This is among the essential causes for creating this model of the optimization report.
Genetic optimization
The examples above are made by full optimization – in it the variety of passes of every parameter is the same as the variety of its attainable values. In genetic optimization, the variety of passes will likely be totally different. For instance, so:
MA Interval = 30 confirmed the best revenue, so it was studied by the optimizer 2-5 instances greater than the opposite parameters.
2D graphs
The graphs for all pairs of optimized parameters are additionally made extra visible. As a substitute of a mosaic with coloured rectangles, mini graphs are drawn. The primary parameter in a pair is represented by one of many coloured strains (for instance, there are 4 strains in whole), and the second parameters are separated by vertical dotted strains on the X-axis (for instance, there are 6 columns). In whole, we have now 4 strains in 6 columns = 24 mini graphs. In MT5, that is drawn as 24 coloured rectangles.
| MT5 | Superior Optimization Report |
| Exhibits a mosaic of 24 rectangles with altering colours. Every pair will be represented in two methods. | Exhibits all of the strains on the identical graph in the identical scale, however with totally different colours, to allow them to be distinguished from one another and in contrast. Every pair will be represented in two methods, and one among them is often extra handy. |
The primary choice: | The primary choice: 6 choices for SL values (10,20,50,100,200,500) are introduced as columns separated by dotted strains. |
The second choice:![]() | The second choice:![]() We even have 24 mini graphs, however there isn’t a sequential motion, which is much less handy. |
In MT5, you possibly can solely view one pair of optimized parameters at a time. Right here, you possibly can view all of them directly, which can be handy for evaluation. You possibly can select essentially the most handy graph from the pair.
If there are numerous columns on a 2D chart and the width is small, it turns into tough to make out something. The instance is created by the genetic optimization of the MA Skilled Advisor, which yow will discover on the directions web page. There are 91 columns proven right here:
To make all the things seen, merely enhance the width of the chart. Right here is similar instance with a width of 2000 pixels:
Now, each the column values and the chart strains are clearly seen.
Graph administration:
- You possibly can change the looks of the graph strains utilizing the Stairs/Strains, Crisp/Blurry, and Daring switches. The width and top fields can be utilized to resize the graph window.
- In the event you click on on any graph, it’ll open in a big window in Google Charts, which have a zoom function with the mouse wheel and present correct values on the Y-axis.
Superior Optimization Report Google Chart 

- The built-in graphs in this system will be displayed on a pc with out an web connection. Google Charts will solely show with an web connection.
Optimized variables statistics:
Beneath the 1D and 2D graphs, there are buttons labeled “Present Min/Max/Avg/Med“. In the event you click on on these buttons, you will notice tables with statistics for the at the moment chosen optimization parameter or analysis criterion.
You will notice the utmost, common, median, and minimal values, in addition to the variety of passes every worth was used. The rows are sorted by Common. The typical worth can be displayed on the 1D graph.
Primarily based on the common or median worth, it’s attainable to judge which of the variants of the optimized parameter or criterion provides one of the best technique outcomes on common. For instance, you possibly can select the utmost common for revenue and the minimal common for drawdown, and so forth.
You possibly can kind the values by any row. The utmost worth has a inexperienced background, and the minimal worth has a crimson background.
Pattern:
Detailed report:
Will get optimization knowledge from the .choose file. It accommodates a number of data that you do not see within the MT5 report. “Superior Optimization Report” will present you all the things in HTML format in your browser.
It shows 8 normal technique optimization standards, as in MT5.
Moreover, there are 35 different technique analysis standards divided into teams: Customary standards, as in MT5, Revenue/Loss, Stability, Fairness, Trades, Consecutive, and Different.
Moreover, standards have been added that may be calculated from different standards within the .choose file:
|
Extra management buttons are positioned beneath the detailed report desk:
- In the event you click on on the “Edit Columns” button, you possibly can cover the columns that you’re not all for for analysis. It will make the desk take up much less area and solely present the mandatory data.
- When enhancing columns, you possibly can mark them manually or use the Verify All or Uncheck All buttons.
The string with the numbers 10001011010… is an inventory of chosen columns, and it may be exported to an Skilled Advisor in order that solely the specified columns are chosen for brand new experiences. Alternatively, you possibly can copy and paste this string into one other report.
Different options:
- If a ahead take a look at has been added to the optimization, its values will likely be displayed within the second row of every cell. That is extra handy than in MT5, the place there are two separate experiences. Ahead take a look at values are not included in calculations, graphs, sorting, or filtering. Nonetheless, you possibly can create a separate report by deciding on just one ahead take a look at file.
- Sadly, the advanced criterion has not been added to the .choose file and can’t be proven till it’s added to the .choose file by the Meta Quotes builders. Now you can show it within the report by including a further code to your Skilled Advisor, in case you have entry to its code (see particulars under).
- The values are formatted in an easy-to-read financial format. As a substitute of 123456789.01, during which it’s obscure what number of hundreds and thousands and thousands there are (you might want to depend the variety of digits), you will notice 123 456 789.01 right here it’s instantly seen.
- Pagination is programmed for the desk rows. You possibly can show from 5 to 10,000 strains on a single web page.
- Whenever you click on on any cell within the desk, the row and column are highlighted in coloration. On this case, the settings of the chosen passage are copied to the clipboard. You possibly can go to the settings tab within the tester and press Ctrl-V there, the settings will likely be utilized.
- Moreover, within the Go column, the cross quantity is made by a button, when clicked, the pass_XX.set settings file will likely be downloaded, then it may be saved to the specified location, for instance, to the folder with the HTML report
Under are this system’s options in case you have entry to the Skilled Advisor code and may add further features to it.
Directions for including features to avoid wasting charts and statistics.
Mini stability and fairness charts:
You probably have entry to the EA code, you possibly can add features that may save stability and fairness charts, in addition to calculate further optimization standards. Mini-charts will likely be displayed within the report for every cross, so that you need not run single checks for every choice you are all for. As soon as you’ve got chosen one of the best choices on this report, you possibly can take a look at them individually within the MT5 tester. It will prevent a number of time.
The chart settings block:

- The Small top subject modifications the peak of the mini-charts.
- The Small/Massive checkbox will increase all charts to 255 pixels.
- The Revenue/Stability checkbox switches the values to revenue or stability.
- The testing interval on the chart can be specified on this block.
Options:
- Stability and fairness charts present trades on a time scale, relatively than with equal intervals between trades (as within the MetaQuotes tester). It occurs that there are 2 months between trades, however they’re proven aspect by aspect as if there are 5 minutes between them.
Instance:
50 of the identical trades are positioned on each charts.
The higher chart is constructed with a uniform step between trades and appears promising.
The decrease chart is constructed on a time scale and exhibits that the knowledgeable traded slightly at the start and slightly extra on the finish.
From the time-based chart, it’s instantly clear that there will likely be lengthy durations of inactivity on this technique. Such a buying and selling will not be as fascinating because it appeared from the uniform-step chart. - The graphs are initially displayed at a top of fifty pixels. You possibly can regulate the peak of the charts within the Small top subject.
- Whenever you click on on a graph, it expands to a top of 255 pixels. That is the utmost decision, as every level is encoded as a single byte with 255 top choices for compactness. Whenever you click on on the graph once more, it collapses.
- The graphs show the minimal and most values of revenue or stability.
- If the optimization was carried out with a ahead, it will likely be positioned to the precise of the backtest graph. Its width will likely be proportional to the testing interval. For instance, if the ahead is 1/3 of the full testing interval, then the backtest will take up 2/3 of the width. Because of this the time scale would be the identical for each graphs.

- You possibly can select the width of the graph within the Pixels in stability and fairness charts parameter earlier than beginning the testing.
It is suggested to make use of a width of 200-300 pixels, as that is ample for visible notion, as proven within the examples. Nonetheless, you may also use a width of as much as 2 000 pixels, however this may end in a 10-fold enhance within the file measurement. Width better than 2 000 will likely be diminished to 2 000.
You probably have greater than 100 000 optimization passes, then to avoid wasting disk area, you might want to cut back the width of the graphs to 100 or 50 pixels.
- You possibly can cancel saving statistics and stability and fairness charts by setting the Save Statistics parameter to false.
Gathering statistics and graphs doesn’t decelerate optimization:
– Optimization with out gathering statistics and graphs: optimization accomplished in 1 minutes 28 seconds
– Optimization with gathering statistics and graphs: optimization accomplished in 1 minutes 29 seconds
The slowdown is lower than 1%. - .choose information from MT5 and the chart file take up some disk area. Whenever you create a report, they aren’t deleted, however moved to the report folder for reuse, for instance, to view a separate ahead take a look at report. You probably have many optimizations or massive chart widths, you could have to manually delete pointless information to liberate disk area.
Extra optimization standards
The added code permits you to add further optimization standards to the report:
- Complicated optimization criterion (it isn’t accessible within the .choose file, however solely by features that may be added to the code)
- Coefficients: Sharpe, Sortino, Titov‘s take a look at coefficient, and normal deviation calculated utilizing logarithms of value deltas on the M1 timeframe (as in MT5). Moreover, they’re calculated utilizing value deltas. These coefficients are solely calculated when fairness knowledge is collected on every tick (that is optionally available).
Their calculations have been disclosed within the article. The calculated Sharpe coefficient is virtually equivalent to what MT5 exhibits. The Sortino coefficient and normal deviation are calculated in the identical perform and copied into the report as is.
The experimental Titov coefficient is described on the discussion board. I discovered it fascinating so as to add to the report. - Z-score, Cash Compounding vs 1 lot, LR Customary error, LR Correlation calculations are copied from the article https://www.mql5.com/en/articles/1492
R2 = LR Correlation ^2 .
Revenue Stability is described within the article https://www.mql5.com/en/articles/3642 - Deviation from Line, Deviation from Line Detrimental solely, Deviation from Line in Factors, Deviation from Line Detrimental solely in Factors – the utmost deviations of the worth from the straight line between the primary and final commerce. The road is calculated with an equal step between trades, as in MT5.
Merely Deviation from Line – takes under consideration deviations each down and up from the straight line. Detrimental solely – takes under consideration solely drawdowns under the road.
Plus 2 related standards in factors – they may differ from the factors in cash if buying and selling is finished with totally different tons (reinvestment, pyramid, martingale, and so forth.). - Standards in factors: Revenue, Markup, Revenue / Markup, Anticipated PayOff, Anticipated Markup, Min, Max drawdown, Drawdown % in Factors, Customary error.
They’re calculated as in case you have been all the time buying and selling with one lot.When buying and selling with the identical lot, the sorting standards are the identical as Revenue, Anticipated PayOff, Stability min, Max drawdown stability, however they may differ by an element of 100 in case your quantity is 0.01.
When buying and selling with totally different tons, they may nonetheless present as in case you have been buying and selling with one lot.
For instance, when buying and selling with Martingale, it could occur that the revenue in factors is unfavourable, and the achieve is achieved solely by growing the lot measurement and the danger of buying and selling.
The touch upon Drawdown % in Factors: is that, in contrast to Drawdown % of Stability, it’s calculated based mostly on the earlier most revenue in factors, relatively than the stability. Since it’s unattainable to calculate the preliminary stability in factors when buying and selling with totally different volumes, the calculation is predicated on the utmost revenue. - The variety of repeated losses is calculated individually for Purchase and Promote.
- Whole: Buying and selling end result (the results of transactions excluding swaps, commissions and costs),
Swap, Fee, Charges – their sum is the same as Markup. This division will be helpful for analyzing bills.
Buying and selling end result / Markup to estimate what number of instances you earn greater than you spend.
Buying and selling end result – Markup = Revenue from the primary column of the primary standards.
Whole: Quantity and Turnover. They could be fascinating for evaluating rebates. - You too can add all 43 parameters just like these within the MT5 .choose file. These parameters are helpful in case you are optimizing in mathematical calculation mode.
For them:- Restoration issue is calculated by fairness when gathering statistics on every tick.
If statistics are usually not collected on every tick (that is optionally available), then the Restoration issue is calculated based mostly on the stability. On this case, the Drawdown fairness %, Sharpe ratio, and all 5 fairness parameters will likely be equal to 0. - The utmost drawdown of fairness within the built-in calculation is decrease (worse) than within the MT5 report. It’s assumed that MT5 can examine this not on each tick, however on every M1 or in another manner.
- Restoration issue is calculated by fairness when gathering statistics on every tick.
Different optimization standards could also be added in future variations. You probably have an fascinating criterion with implementation code, please counsel including it by the suggestions type.
Tips on how to use Superior Optimization Report
Launch the “Superior Optimization Report” Skilled Advisor:

- Click on the Import button. Within the window that opens, copy the trail to the folder from the tackle bar.
Instance: - Within the tester window, right-click, choose Export Optimization Cache File, and paste the beforehand copied path into the tackle bar.
This could solely be accomplished the primary time, then the tester will bear in mind this folder for export.
Click on Save - Within the import window (from step 1), choose the exported .choose file (there will likely be two information in case you optimized with ahead, choose each).
In the event you recorded charts utilizing the code added to the Skilled Advisor, choose the Charts.choose file as effectively.A window will seem:

You possibly can uncheck the packing containers for optimization standards that you don’t want to show. Whenever you uncheck them, they are going to be saved, however they are going to be hidden whenever you first load the report. You possibly can present them by clicking the Edit Columns button within the report.
Click on the Save button. - Within the window that opens, right-click on the HTML web page Report.htm, and choose Open. The default browser will open the report web page.

- Whenever you return to the Skilled Advisor, shut the window that opened, in any other case it won’t reply to mouse clicks.
- In the event you add an indicator from the web page https://www.mql5.com/en/blogs/put up/766737, then the report will open proper within the browser. It’s extra handy and quicker (with out the actions described in paragraphs 4 and 5).




















