MetaTrader 5 build 2530: Sorting in Market Watch and advanced operations with optimization results

What's new in MetaTrader 5

10 July 2020


  1. A sorting option has been added to the Market Watch window:

    • Click on a column name to sort the list by required data, such as the symbol name, close price, daily change or other variables.
    • Use the new menu with the most popular sorting options. Sorting by the highest growth and fall based on a daily symbol price change can be useful when trading exchange instruments.

  2. Redesigned and improved built-in learning system.
    All interactive hints are grouped into various categories for easier navigation. The number of completed and remaining hints is shown for each category.

    Every hint is now provided with a checklist, indicating the key action which the user should execute in order to complete training.
    We have also revised the learning system design and fixed errors in the total progress calculation.

  3. Added automated calculation of a symbol's previous session close time and of its current session open time. If the appropriate data is not provided by the broker directly, the terminal will calculate the values based on the first and the last quotes in a session. The relevant information can be displayed in the Market Watch window: enable appropriate columns in the "Symbols" section or navigate to the "Details" section.

  4. Optimized and accelerated application of prices to open positions. When new ticks arrive in the terminal, prices, profit and margin requirements are updated faster.
  5. Fixed calculation of the built-in Stochastic Oscillator. An error could occur in the case where a limited number of bars was displayed on charts.


  1. Optimized and accelerated AccountInfo* function which provides access to trading account properties.
  2. Optimized and accelerated access to numerical chart properties via the ChartGetInteger function.


  1. The following context menu commands have been added to the code editing tabs for efficient operations with the MQL5 Storage:

    • Compare a working copy of a file with the current revision
    • Revert changes
    • View file change history

  2. Changed the highlighting of matching brackets. Now, highlighting is applied to brackets instead of the background. The highlighting is disabled by default. It can be enabled in editor settings.

  3. Improved search and replace functions:

    • If you select a text in the file and bring up the search box, the text will be automatically substituted in the "Find" field. If no text is selected, a text from the clipboard will be pasted in the "Find" field. If the clipboard is empty, the focus in the search box will be set to the "Find" field.
    • A similar behavior is implemented for the replace window: the selected text is inserted in the search field, and the cursor is moved to the "Replace with" field. Thus, you can immediately enter the required new text.
    • Search and replace results are now displayed in the log instead of the previously used separate dialog box. If the Toolbox window is enabled, the Journal tab will be automatically selected in it. Thus, you do not need to work with extra windows.

  4. Fixed search in the file comparison window when working with the MQL5 Storage.
  5. Added possibility to search and replace data in files connected to the current file via the #include directive.

    The new option enables faster operations with projects consisting of multiple files. For example, to replace a text in all files, you will not need to specify their directories manually. The editor can automatically find them through the #include directives.


  1. We have revised optimization criteria which include two variables, one of which is the balance. Now, the criteria only take into account the second variable and ignore the balance. The new optimization criteria are easier to analyze.

    • Balance + Maximum Profitability -> Maximum Profitability
    • Balance + Maximum Expected Payoff -> Maximum Expected Payoff
    • Balance + Minimum Drawdown -> Minimum Drawdown
    • Balance + Maximum Recovery Factor -> Maximum Recovery Factor
    • Balance + Maximum Sharpe Ratio -> Maximum Sharpe Ratio

  2. New quick commands in the "Optimization parameters" submenu, allow showing or hiding, of all input columns in the table with optimization results:

  3. Added coloring for the optimization results table and graph, for a more convenient visual analysis.
    The graph is colored with a green-to-red gradient, depending on the value of the optimization criterion. The following colors are used for the table:

    • Balance: values above the initial deposit are colored in blue, and those below the initial deposit are shown in red.
    • Profit: blue is used for values greater than zero, and red is used for values less than zero.
    • Expected Payoff: blue is used for values greater than zero, and red is used for values less than zero.
    • Drawdown: from green (0-5%) to red (greater than 30%).
    • Sharpe Ratio: from green (greater than 2) to red (less than 0).
    • Recovery Factor: from green (greater than 2) to red (less than 1).

  4. Filters have been added in the optimization results table. Use the filters to hide unsuccessful passes from the list:

    • Passes without trades
    • Loss-making passes
    • Passes with the drawdown greater than 50%
    • Passes with the Recovery Factor less than 1
    • Passes with the Sharpe Ratio less than 0.5

  5. Optimized work of the MQL5 Cloud Network. Now, when an optimization is launched for the same Expert Advisor, the network tries to use the same testing agents which were used during the previous optimization pass. This is because the required market environment, including the trading history, is already available for such agents.
Updated documentation.