MetaTrader 5 build 4230: More built-in applications and expanded ONNX support

Preparations are underway for the launch of Nasdaq market data subscriptions. Right from the platform, traders will be able to access real-time quotes and deep price histories for hundreds of financial instruments from one of the largest exchanges

7 March 2024

Terminal

  1. Added 28 new Expert Advisors and 12 new indicators to the standard platform package. The applications are available in the Expert Advisors\Free Robots and Indicators\Free Indicators sections in the Navigator. Each program is available as source code with detailed comments to assist you in learning the MQL5 language.

    The robots implement trading strategies based on technical indicators and candlestick patterns, such as 3 Black Crows – 3 White Soldiers, Bullish Engulfing – Bearish Engulfing, Bullish Harami – Bearish Harami and others. New indicators are implementations of popular channels: Camarilla, DeMark, Donchian, Fibonacci and Keltner, among others.

    Added 28 new Expert Advisors and 12 new indicators in the standard platform package.


  2. Preparations are underway for the launch of Nasdaq market data subscriptions. Right from the platform, traders will be able to access real-time quotes and deep price histories for hundreds of financial instruments from one of the largest exchanges. Subscriptions will be available to any user having a demo account on the MetaQuotes-Demo server and an MQL5.community account.

    Nasdaq Market Data Subscription


    To get started, you only need to purchase a subscription and add the relevant symbols to your Market Watch. You can use these symbols as regular instruments: open charts, analyze them using objects and indicators, and run Expert Advisors in the strategy tester. Access to all information is implemented as for ordinary financial instruments with which you work with a broker.

  3. Improved margin section in the instrument specification. The section now features margin rates and calculated values for each instrument.


    Improved margin section in the instrument specification


    Fixed errors in margin display for certain types of symbols.

  4. Added link to the MQL5 Telegram channel in the Help menu. Interesting content for developers is regularly shared in the channel, including reviews of new programming articles and free robots and indicators from the Code Base. Subscribe to the channel and ensure you don't miss out on important information.

    Added link to the MQL5 Telegram channel in the Help menu.


  5. Added support for the ShutdownTerminal parameter in the [StartUp] section of custom configuration files. Use this parameter to launch the platform to execute one-off tasks using scripts. For example, you have a script that takes a screenshot of the chart. You can create a configuration file that launches this script along with the platform. If you add ShutdownTerminal set to 'Yes' to this file, the platform will automatically shut down immediately after the script completes.
  6. Enhanced protection of network protocols and Market products.
  7. Disabled support for the Signals service for demo accounts. To access enhanced statistics on your training accounts, use the new trading report. It features a plethora of metrics characterizing your strategy profitability and risks, including growth, balance and equity graphs, diagrams of trade distribution by direction and instruments, and much more.
  8. Fixed display of broker agreement links in the Help menu.
  9. Improved selection of the best server when renting VPSs.
  10. Fixed refreshing of the subscriptions page when switching between sections in the Navigator.
  11. Fixed updating of the list of agreements when opening a preliminary account.
  12. Updated translations of the user interface.

MQL5

  1. Added MQL_STARTED_FROM_CONFIG property in the ENUM_MQL_INFO_INTEGER enumeration. Returns true if the script/Expert Advisor was launched from the StartUp section of the configuration file. This means that the script/Expert Advisor had been specified in the configuration file with which the terminal was launched.
  2. We continue expanding support for ONNX models.

    Machine learning tasks do not always require greater computational accuracy. To speed up calculations, some models use lower-precision data types such as Float16 and even Float8. To allow users to input the relevant data into models, the following functions have been added to MQL5:
    bool ArrayToFP16(ushort &dst_array[],const float &src_array[],ENUM_FLOAT16_FORMAT fmt);
    bool ArrayToFP16(ushort &dst_array[],const double &src_array[],ENUM_FLOAT16_FORMAT fmt);
    bool ArrayToFP8(uchar &dst_array[],const float &src_array[],ENUM_FLOAT8_FORMAT fmt);
    bool ArrayToFP8(uchar &dst_array[],const double &src_array[],ENUM_FLOAT8_FORMAT fmt);
    
    bool ArrayFromFP16(float &dst_array[],const ushort &src_array[],ENUM_FLOAT16_FORMAT fmt);
    bool ArrayFromFP16(double &dst_array[],const ushort &src_array[],ENUM_FLOAT16_FORMAT fmt);
    bool ArrayFromFP8(float &dst_array[],const uchar &src_array[],ENUM_FLOAT8_FORMAT fmt);
    bool ArrayFromFP8(double &dst_array[],const uchar &src_array[],ENUM_FLOAT8_FORMAT fmt);
    Since real number formats for 16 and 8 bits may differ, the "fmt" parameter in the conversion functions must indicate which number format needs to be processed. For 16-bit versions, the new enumeration NUM_FLOAT16_FORMAT is used, which currently has the following values:

    • FLOAT_FP16 – standard 16-bit format also referred to as half.
    • FLOAT_BFP16 – special brain float point format.

    For 8-bit versions, the new ENUM_FLOAT8_FORMAT enumeration is used, which currently has the following values:

    • FLOAT_FP8_E4M3FN – 8-bit floating point number, 4 bits for the exponent and 3 bits for the mantissa. Typically used as coefficients.
    • FLOAT_FP8_E4M3FNUZ — 8-bit floating point number, 4 bits for the exponent and 3 bits for the mantissa. Supports NaN, does not support negative zero and Inf. Typically used as coefficients.
    • FLOAT_FP8_E5M2FN – 8-bit floating point number, 5 bits for the exponent and 2 bits for the mantissa. Supports NaN and Inf. Typically used for gradients.
    • FLOAT_FP8_E5M2FNUZ — 8-bit floating point number, 5 bits for the exponent and 2 bits for the mantissa. Supports NaN, does not support negative zero and Inf. Also used for gradients.

  3. Added new matrix and vector methods used in machine learning:

    • PrecisionRecall computes values to construct a precision-recall curve. Similarly to ClassificationScore, this method is applied to a vector of true values.
    • ReceiverOperatingCharacteristic — computes values to construct the Receiver Operating Characteristic (ROC) curve. Similarly to ClassificationScore, this method is applied to a vector of true values.

  4. ONNX Runtime updated to version 1.17. For release details, please see GitHub.
  5. Python integration package updated to version 5.0.4200, added support for Python 3.12. Update your package using the command "pip install --upgrade MetaTrader5" to get the latest changes.
  6. Added DEAL_REASON_CORPORATE_ACTION property in the ENUM_DEAL_REASON enumeration. It indicates a deal executed as a result of a corporate action: merging or renaming a security, transferring a client to another account, etc.
  7. Added support for comparing complex vectors and matrices for the Compare method. The comparison involves estimating the distance between complex numbers. The distance is calculated as sqrt(pow(r1-r2, 2) + pow(i1-i2, 2) and is a real number that can already be compared with epsilon.
  8. Fixed conversion of color type variables to text in RGB format.
  9. Fixed returning of the result of obtaining eigenvectors in the Eig method in the case of a complex eigenvalue. Added method overload for complex evaluation.
  10. Fixed OrderCalcMargin function operation for certain cases.

MetaEditor

  1. Added link to the recently released book "MQL5 Programming for Traders" in the Help\MQL5.community menu. The book has also been added to the search system, and thus you can find the necessary information directly from MetaEditor:

    Added search for the book "MQL5 Programming for Traders"



  2. Built-in search improvements:

    • The search results section in the Toolbox window has been divided into two tabs: "Search" for online search results (documentation, articles, book, etc.) and "Search in files" for local results.
    • A separate search string has been added to the results section. You can use it instead of the search bar in the main MetaEditor toolbar.

  3. Added support for AVX, AVX2 and AVX512 modes when compiling commands from the command line. To compile, add one of the following keys to your command: /avx, /avx2 or /avx512.
  4. SQLite engine for database operations updated to version 3.45.
  5. Disabled support for Internet Explorer. Now only Microsoft Edge WebView2 is used to display HTML pages. Compared to the outdated MSHTML, the new component significantly expands content displaying capabilities by providing access to the latest technologies. The use of WebView2 improves the appearance of some MetaEditor sections, increases performance, and creates a more responsive interface.
  6. Fixed freezing that occurred in rare cases on function autocompletion.

Tester

  1. Fixed calculations of triple swaps if the test start day falls on the triple-swap day.

MetaTrader 5 Web Terminal

Improved display of margin requirements in contract specifications. Now, in addition to ratios and initial parameters for calculations, specifications display the final margin values. If the margin amount depends on the position volume, the corresponding levels will be shown in the dialog.


Improved display of margin requirements in contract specifications


The margin is calculated based on the instrument price at the time the specification window opens and is not updated in real time. Therefore, the values should be considered indicative. To recalculate values based on current prices, reopen the instrument specification.