What's new in MetaTrader 5

The history of updates of the desktop, mobile and web platforms

11 October 2024

MetaTrader 5 build 4620: MQL5 bug fixes and new OpenBLAS methods

Terminal

  1. Fixed an error that caused an incomplete tick history to be returned under certain conditions.
  2. Fixed autocompletion when selecting symbols in languages other than English. When you type a symbol name in the search field, the system automatically suggests relevant options based on the entered characters. The search function now works correctly and case-insensitively across all locales.

MQL5

  1. Descriptions of new OpenBLAS methods have been added to MQL5 Documentation. Currently, 15 new methods for matrices and vectors are available, with more to be added soon.
    OpenBLAS is an efficient open-source solution for high-performance computing, especially when working with big datasets.

    Function

    Action

    SingularValueDecompositionDC

    Singular Value Decomposition, divide-and-conquer algorithm; considered the fastest among other SVD algorithms (lapack function GESDD).

    SingularValueDecompositionQR

    Singular Value Decomposition, QR algorithm; considered a classical SVD algorithm (lapack function GESVD).

    SingularValueDecompositionQRPivot

    Singular Value Decomposition, QR with pivoting algorithm (lapack function GESVDQ).

    SingularValueDecompositionBisect

    Singular Value Decomposition, bisection algorithm (lapack function GESVDX).

    SingularValueDecompositionJacobiHigh

    Singular Value Decomposition, Jacobi high-level algorithm (lapack function GEJSV).

    SingularValueDecompositionJacobiLow

    Singular Value Decomposition, Jacobi low-level algorithm (lapack function GESVJ). The method computes small singular values and their singular vectors with much greater accuracy than other SVD routines in certain cases.

    SingularValueDecompositionBidiagDC

    Singular Value Decomposition, divide-and-conquer algorithm for bidiagonal matrices (lapack function BDSVDX).

    SingularValueDecompositionBidiagBisect

    Singular Value Decomposition, bisection algorithm for bidiagonal matrices (lapack function BDSVDX).

    EigenSolver

    Compute eigenvalues and eigenvectors of a regular square matrix using the classical algorithm (lapack function GEEV).

    EigenSymmetricDC

    Compute eigenvalues and eigenvectors of a symmetric or Hermitian (complex conjugate) matrix using the divide-and-conquer algorithm (lapack functions SYEVD, HEEVD).

    SingularSpectrumAnalysisSpectrum

    A method function for calculating the relative contributions of spectral components based on their eigenvalues

    SingularSpectrumAnalysisForecast

    A method function for calculating reconstructed and predicted data using spectral components of the input time series.

    SingularSpectrumAnalysisReconstructComponents

    A method function for calculating reconstructed components of the input time series and their contributions.

    SingularSpectrumAnalysisReconstructSeries

    A method function for calculating the reconstructed time series using the first component_count components.

  2. Fixed errors when running older versions of executable MQL5 program files (.ex5) that use matrix::CopyRates methods. These errors did not occur in files compiled under new versions.
  3. Fixed type-checking for orders allowed in union.

MetaTester

  • Fixed crashes that could occur under certain conditions during the deinitialization of custom indicators.

4 October 2024

MetaTrader 5 Platform build 4585: Performance improvements

Terminal

  • Fixed crashes that could occur under certain conditions while stopping profiling of MQL5 programs.

MetaEditor

MetaTester

  • Fixed crashes that occurred under certain conditions when re-running single pass tests.

27 September 2024

MetaTrader 5 build 4570: Enhancements to the Web version and OpenBLAS integration in MQL5

Terminal

  1. Restricted access to MQL5 trading and history functions if the account is subscribed to a signal.

    When a signal subscription is detected on the account (regardless of whether copying is enabled in the current terminal), any MQL5 trading function calls are prohibited, including receiving open orders and positions, receiving history, and performing trading operations. A corresponding warning is logged in the journal:
    'XXX': signal subscription detected, trading and history access functions in MQL5 and Python disabled
    The restrictions also apply to Python trading functions: positions_total, positions_get, orders_total, orders_get, history_orders_total, history_orders_get, history_deals_total, history_deals_get, order_check, and order_send.

    If a signal subscription is canceled on the account or you connect to another account without a signal subscription, the restriction is lifted, and the following message is logged:
    'XXX': no signal subscription detected, trading and history access functions in MQL5 and Python enabled
    If the restriction is active on the account, MQL5 functions will return the following response codes:

    • OrderSend and OrderSendAsync return RET_REQUEST_AT_DISABLED_CLIENT
    • OrdersTotal and PositionsTotal return 0
    • PositionGetSymbol, PositionSelect, PositionSelectByTicket, and PositionGetTicket return ERR_MQLAPI_TRADE_POSITION_NOT_FOUND
    • OrderGetTicket and OrderSelect returns ERR_MQLAPI_TRADE_POSITION_NOT_FOUND
    • HistorySelect returns ERR_MQLAPI_TRADE_DEAL_NOT_FOUND

  2. Fixed, optimized and accelerated tick history request and export to CSV\HTML files.
  3. Added Microsoft Edge WebView2 support for displaying HTML content in the trading platform on macOS. Compared to the outdated MSHTML, the new component significantly expands content displaying capabilities by providing access to modern technologies. The transition to WebView2 improves the appearance of Market, Signals, VPS, and other sections, increasing their performance and creating more responsive interfaces.

  4. Fixed context menu in the internal mail sending window.
  5. Fixed filtering in the trading instrument selection dialog. It is no longer necessary to first input instrument names to hide expired instruments.
  6. Fixed calculation of margin requirements in the contract specification window. The error occurred for Exchange Stocks and Bonds instruments.
  7. Improved bulk position closing function for FIFO accounts. Incompatible operation types are no longer displayed for such accounts, including closing of all profitable/losing positions, same-directed positions and opposite positions.
  8. Fixed issue where users could not place opposite pending orders on accounts where position closing follows the FIFO rule.
  9. Fixed calculation of liquidation value for accounts with positions on Exchange Futures instruments.
  10. Fixed floating profit calculations for positions on Exchange Bonds and Exchange MOEX Bonds instruments.
  11. Disabled automatic demo account creation when the platform is launched without previously added accounts.
  12. Improved name and email validation when registering accounts.
  13. Fixed margin calculation for hedged positions. The error could occur in certain cases when using floating margin on the account (calculated based on the volume/value of current positions).
  14. Fixed updating the "Next" button state in the demo account opening dialog. After entering the phone or email confirmation code, the button could remain inactive under certain conditions.
  15. Updated user interface translations.

MQL5

  1. Added native integration with the OpenBLAS matrix computation library.

    OpenBLAS is a high-performance open-source linear algebra library that implements BLAS (Basic Linear Algebra Subprograms) and some LAPACK functions. OpenBLAS is designed to improve computational performance, particularly in matrix and vector operations, which are often used in scientific and engineering tasks such as machine learning, numerical methods, and simulations.

    Key features of OpenBLAS:

    • Multithreading support: OpenBLAS can efficiently use multiple processor cores for parallel computations, significantly accelerating operations on multiprocessor systems.
    • Optimization for processor architectures: OpenBLAS includes optimized builds for various processors such as Intel, AMD, ARM and others. The library automatically detects processor characteristics (supported instruction sets like AVX/AVX2/AVX512) and selects the most suitable function implementations.
    • Extensive BLAS operation support: OpenBLAS implements core BLAS functions, including vector operations (e.g., vector addition and dot product), matrix operations (multiplication), and vector-matrix operations.
    • LAPACK compatibility: The library supports LAPACK (Linear Algebra PACKage) functions for more complex linear algebra operations, such as solving systems of linear equations, calculating matrix eigenvalues, and others.
    • High performance: Compared to other BLAS libraries, OpenBLAS often demonstrates better results due to hand-crafted optimizations for specific processor architectures.

    OpenBLAS is widely used in applications involving numerical computations:

    • Training neural networks and other machine learning tasks.
    • Scientific computing (e.g. modeling of physical processes).
    • Processing and analyzing large amounts of data.

    The following methods are currently available in MQL5:

    Singular value decomposition:

    • SingularValueDecompositionDC – divide-and-conquer algorithm; considered the fastest among other SVD algorithms (lapack function GESDD).
    • SingularValueDecompositionQR – QR algorithm; considered a classical SVD algorithm (lapack function GESVD).
    • SingularValueDecompositionQRPivot – QR with pivoting algorithm (lapack function GESVDQ).
    • SingularValueDecompositionBisect – bisection algorithm (lapack function GESVDX).
    • SingularValueDecompositionJacobiHigh – Jacobi high level algorithm (lapack function GEJSV).
    • SingularValueDecompositionJacobiLow – Jacobi low level algorithm (lapack function GESVJ). The method computes small singular values and their singular vectors with much greater accuracy than other SVD routines in certain cases.
    • SingularValueDecompositionBidiagDC – divide-and-conquer algorithm for bidiagonal matrices (lapack function BDSVDX).
    • SingularValueDecompositionBidiagBisect – bisection algorithm for bidiagonal matrices (lapack function BDSVDX).

    Eigen methods:

    • EigenSolver – compute eigenvalues and eigenvectors of a regular square matrix using the classical algorithm (lapack function GEEV).
    • EigenSymmetricDC – compute eigenvalues and eigenvectors of a symmetric or Hermitian (complex conjugate) matrix using the divide-and-conquer algorithm (lapack functions SYEVD, HEEVD).

    Detailed documentation will be provided soon.

  2. Added the SYMBOL_SWAP_MODE_CURRENCY_PROFIT value in the ENUM_SYMBOL_SWAP_MODE enumeration. If the SymbolInfoInteger function returns this value, swaps on the account are charged in the profit calculation currency.
  3. Expanded ONNX Runtime support. Added new types of machine learning operations, allowing you to run more advanced neural models.
  4. We continue transition to a more efficient MQL5 compiler, which is already used for some functions. The transition will allow for further optimizations and faster program execution.
  5. Added new data types to support the OpenBLAS library:

    • complexf – complex number represented by float data
    • vectorcf – vector containing elements of type complexf
    • matrixcf – matrix containing elements of type complexf

  6. Improved WebRequest operations when working with websites that violate URL formatting rules, contain redirect errors or have long lists of alternative DNS names.
  7. Fixed simultaneous assignment of matrix or vector types to multiple variables.

MetaEditor

  1. Updated available models for the AI Assistant. The more advanced GPT-4o mini now replaces GPT-3.5 Turbo. Also added the 01-mini model.
  2. Fixed debugger error due to which variable values could fail to update in the watch window.
  3. Updated user interface translations.

MetaTester

  1. Fixed saving of margin coefficients in custom symbol settings.
  2. Fixed memory leaks that could occur between testing passes under certain conditions.

Web Terminal

  1. Added Crosshair mode for viewing precise values and measuring distances on charts.

    Enable the mode by clicking the relevant button on the left panel. Move the crosshair over any point on the chart to see the date and price on the respective axes. To measure distance, click on any point on the chart and drag the cursor to another point while holding the mouse button.




    You can also use shortcuts: press the middle mouse button to enable crosshair and use Esc or right-click to disable it.

  2. Added a simple line chart constructed on bar closing prices:




  3. In the mobile view, added ability to display additional columns in the Market Watch section. To configure, switch to the table mode and click "...":




  4. Added hotkeys:

    • Home – scroll to the beginning of the chart (earliest date)
    • End – scroll to the end of the chart (latest date)
    • Page Up – scroll the chart one screen back
    • Page Down – scroll the chart one screen forward

  5. Enhanced data security for account connection storage.
  6. Improved chart scrolling, dragging, and scaling functionality.
  7. Accelerated initial loading of the web platform on the page.
  8. Optimized loading of bars.
  9. Fixed floating profit calculations for positions on Exchange Bonds and Exchange MOEX Bonds instruments.
  10. Fixed volume input on the one-click trading panel on charts.
  11. Fixed error in updating the order volumes in the Depth of Market. Values could have been delayed in updating under certain conditions.
  12. Fixed minimum allowable trading volume check when placing orders.
  13. Fixed margin calculation for hedged positions. The error could occur in certain cases when using floating margin on the account (calculated based on the volume/value of current positions).
  14. Fixed error where the Buy and Sell buttons on the one-click trading panel could become inactive until the volume was changed.


21 June 2024

MetaTrader 5 Platform build 4410: Performance improvements MetaTrader 5 Platform build 4410: Performance improvements

We have released MetaTrader 5 build 4410, featuring several important improvements. The cloud-based Strategy Tester has been updated to eliminate possible terminal shutdown for some users upon launching the testing process. The Web Terminal is now more stable, with fixes for browser compatibility checks and demo account opening procedures.

Terminal

  • Fixed terminal crash, which could occur upon testing start under certain conditions.

MQL5

Web Terminal

  1. Fixed validation of browser compatibility with the web terminal. In some cases, users might have erroneously received a message indicating that their browser was not supported.
  2. Fixed opening of demo accounts.
  3. Minor fixes and improvements.
The update will be available through the Live Update system.

MetaTrader 5 for Android

  1. Completely redesigned interface for the tablet versions. It now features a modern design, already proven on the iOS and web versions of the platform. The main sections are now located at the bottom of the screen, and chart operation commands appear are available on the right.




  2. Added context menu to the position history section, allowing quick access to the trading dialog or chart of the corresponding symbol.
  3. Hidden command switching to the trading dialog for non-tradable symbols.
  4. Fixed operation with the MetaQuotes-Demo server.
Update your mobile apps through Google Play, Huawei AppGallery or by downloading the APK file.


7 June 2024

MetaTrader 5 Platform build 4380: Performance improvements

Terminal

  1. Fixed errors which could cause incorrect operation of the Live Update system under certain conditions.
  2. Added new Alt+X hotkey to open a list of experts.
  3. Fixed errors reported in crash logs.

MetaTester

  1. Fixed errors in setting certain properties of the Bitmap graphic object.
  2. The connection of testing agents to the MQL5 Cloud Network is now prohibited when operating in virtual environments and when the processor does not support the AVX instruction set.

Web Terminal

  1. Fixed error in the operation of the one click trading panel on the chart.
  2. Fixed warning dialog that opens when you enable the one click trading panel on the chart.

31 May 2024

MetaTrader 5 Build 4350: More analytical objects in the Web platform and Welcome page in MetaEditor

MetaEditor

  1. Added Welcome page to assist users in starting their journey with algorithmic trading and application development.



    Materials for beginners
    The "Introduction" section presents educational materials available on MQL5.com: language documentation, books, articles, developer forums and code base library. It also introduces services where you can apply and monetize your knowledge: the applications market, freelance and trading signals.

    In the documentation and books sections, you can find a more detailed description of the available learning materials.

    Useful features for developers
    The "What's New" section offers a collection of essential information to keep developers up-to-date:


    Additionally, you will find here a list of recently opened files for quick access.



    For users actively selling their applications in the Market, the "My Sales" report offers an invaluable tool for assessing their performance. It provides access to:

    • Comprehensive sales and download statistics over time.
    • Sales geography, offering insights into regions where your products have the highest popularity. This can suggest ideas for further project expansion, such as localization into specific languages or targeted advertising campaigns in particular regions.
    • Data on top-selling products based on sales volume and revenue generated. The graph can be filtered based on license type: full or rental for a certain duration. Additionally, you can see here a graph with product price changes. All of this will help you understand your customers.
    • Detailed download and sales statistics for each product.


  2. Improved built-in search. The top search bar is now used exclusively for searching text within the current document or in local files. For a global search through educational materials and codes, use a separate section in the Toolbox.


  3. Added support for GPT-4o, the latest ChatGPT model, in AI Assistant. It can be used to automatically complete code and get hints. You can select the new model in the MetaEditor settings.


  4. Updated user interface translations.

Terminal

  1. Increased precision in displaying the calculation price in the trading instrument specification.
  2. Added the hotkey Alt+X to open the list of Expert Advisors.
  3. Fixed MFE and MAE calculations in the trading report.
  4. Fixed saving and restoring of economic calendar filtering settings by country and currency.
  5. Fixed application of templates to charts. Now, if the display of trading history is enabled for the chart, the corresponding objects will not disappear after applying a template.
  6. Fixed errors in the options board. The addition of symbols to the board could cause the platform to freeze under certain conditions.
  7. Fixed error in the position editing dialog. In some cases, incorrect levels could be entered instead of the current Stop Loss and Take Profit values.
  8. Updated user interface translations.

MQL5

  1. Optimized and accelerated the ArrayResize function. The function can be executed up to 40% faster under certain conditions.
  2. Updated support for ONNX.
  3. Fixed MessageBox function calls in service applications. Regardless of the button pressed by the user in the dialog, the function returned a null value.
  4. Fixed error that, in some cases, caused incomplete initialization of MQL5 programs.
  5. Fixed error parsing some macros. The error occurred when using a large number of constants.


MetaTrader 5 Web Terminal

  1. Extended list of available analytical objects. Now, you can utilize the ruler to measure time and prices, draw shapes (rectangle, ellipse, triangle, and circle), and add labels to your charts. All objects can be found in the left panel:


  2. Added ability to rename objects.
  3. Improved integration with the economic calendar. Optimized and accelerated data requests.
  4. Accelerated chart operations.
  5. Accelerated application start and connection to a trading account.
  6. Fixed setting that controls the display of trading operations on the chart.
  7. Fixed display of margin requirements in contract specifications.
  8. Fixed display of account statuses in the history section. Issues could occur on devices with narrow screens.
  9. Fixed display of the Depth of Market changes.

22 March 2024

MetaTrader 5 build 4260: General improvements

Terminal

  1. Fixed errors in subscribing to free products in the Subscriptions service. The relevant button might not be displayed in the dialog under certain conditions.
  2. Updated translations of the user interface.

MQL5

  1. Expanded support for keyboard events:

    • Added CHARTEVENT_KEYUP event for the OnChartEvent handler. It allows the tracking of events related to key releases.
    • Added processing of Dead keys. These are the keys that modify the appearance of the character generated by the key struck immediately after. For example, in the Greek layout, a stressed vowel ά, έ, ύ, etc., can be generated by first pressing ";" and then the vowel. The pressing of such keys can be tracked using the TranslateKey function.
    • Improved TranslateKey and TerminalInfoInteger functions. Now, when receiving CHARTEVENT_KEYUP or CHARTEVENT_KEYDOWN events in OnChartEvent, you can obtain the complete keyboard state at the time the event occurred. For example, if the user pressed the Z key, you will be able to determine whether the Ctrl or Shift key was pressed at that moment. For other events, the functions will continue to operate as before, returning the keyboard state at the current moment.

  2. Updated the Alglib library. Following the update, the following methods in the CMatrixDouble and CMatrixComplex classes have been modified:
    vector<double/complex> operator[](const int i) const;
    vector<double/complex> operator[](const ulong i) const;
    They have been replaced by a single method with a constant return value:
    const vector<double/complex> operator[](const ulong i) const;
    This modification will assist in capturing incorrect use of the result in place as in the new Alglib version, the code mat[row][col]=x operates differently from the old version. Previously, this indicated writing to a matrix. Now, the value is written to a temporary object vector<double/complex>, which is immediately destroyed after recording.

    Adding const to the return value enables the use of mat[row][col]=x. Because mat[row] now returns a constant vector, attempting to overwrite its element with mat[row][col] will result in a compilation error.

  3. Fixed error that could cause the incorrect operation of ChartGet* functions under certain conditions.

MetaEditor

  1. Added search through the contents of the book Neural Networks for Algorithmic Trading in MQL5. The new option appears in the same section as the previously published book MQL5 Programming for Traders.


Tester

  1. Fixed optimization when using a large number of remote agents. In some cases, the error could cause excessive CPU usage.


MetaTrader 5 Web Terminal

  1. Fixed setting of limit orders for instruments with the exchange execution mode. Now, when the price of the order being placed changes relative to the current price (becomes higher or lower), the order type will not switch from Buy Limit to Sell Limit and vice versa, as it does for instruments of other types. Thus, users can place Buy Limit orders above the market and Sell Limit orders below the market, ensuring that the transaction price is guaranteed to be limited.
  2. Fixed the display of selected symbol counters in the Market Watch.

7 March 2024

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

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.

29 February 2024

Introducing the book "Neural Networks for algorithmic trading in MQL5"

We are happy to announce the release of a new book entitled Neural Networks for algorithmic trading in MQL5. From this book, you will learn how to use artificial intelligence in trading robots for the MetaTrader 5 platform. The author, Dmitry Gizlyk, is a hands-on neural network professional; he has written more than a dozen of articles on this topic. Now, with the support of MetaQuotes, all his valuable knowledge is conveniently collected in one book. The book gradually introduces the reader to neural network basics and their application in algorithmic trading. You will learn to create your own AI application, train it and extend its functionality.

Introducing the book "Neural Networks for algorithmic trading in MQL5"


The book is freely available online, under the NeuroBook section of the MQL5 Algo Trading community website. It consists of seven parts:

  • Chapter 1 introduces you to the world of artificial intelligence, laying the foundation with essential neural network building blocks, such as activation functions and weight initialization methods.
  • Chapter 2 explores MetaTrader 5 capabilities in detail, describing how to utilize the platform tools to create powerful algorithmic trading strategies.
  • Chapter 3 guides you through the step-by-step development of your first neural network model in MQL5, covering everything from data preparation to model implementation and testing.
  • Chapter 4 delves deep into understanding fundamental neural layer types, including convolutional and recurrent neural networks, their practical implementation, and comprehensive testing.
  • Chapter 5 introduces attention mechanisms like Self-Attention and Multi-Head Self-Attention, presenting advanced data analysis methodologies.
  • Chapter 6 explains architectural solutions to improve model convergence, such as Batch Normalization and Dropout.
  • Chapter 7 concludes the book and offers methods for testing trading strategies using the developed neural network models under real trading conditions through MetaTrader 5.

The book is intended for advanced users who already know how to write programs in MQL5 and Python. If you are beginning your algorithmic trading journey, we recommend starting with the book "MQL5 programming for traders" and with the language documentation.


18 January 2024

MetaTrader 5 Platform build 4150: Trading report export and new machine learning methods in MQL5

Terminal

  1. Added export of trading reports to HTML and PDF files. With this option, you can easily share your trading achievements with colleagues and investors. New export commands are available in the File menu and in the report menu.

    Export trading report to HTML and PDF files


  2. Added ability to save the current state of the Market Watch window to a CSV file. To do this, select Export in the context menu. The file will save the metrics that are selected at the time of export. To save more data, enable additional columns through the context menu.


    Exporting Market Watch state


  3. Improved display of margin requirements in contract specifications. Now, instead of 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.

  4. 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.
  5. Fixed display of the potential profit/loss value when editing Take Profit and Stop Loss for Stop Limit orders.
  6. Fixes and improvements related to the operation of the Payment system.
  7. Fixed duplicate checks when loading a set of symbols in the Market Watch from a *.set file.
  8. Fixed web installer for Parallels. Now, when using this virtualization system on macOS with M1/M2/M3, the platform will be installed correctly.
  9. Updated user interface translations.
  10. Fixed errors reported in crash logs.

MQL5

  1. Added new methods for operations with matrices and vectors, which are utilized in Machine Learning.

    • ConfusionMatrix — computes the error matrix. The method is applied to a vector of predicted values.
    • ConfusionMatrixMultilabel — computes the error matrix for each label. The method is applied to a vector of predicted values.
    • ClassificationMetric — computes the classification metric to evaluate the quality of the predicted data compared to the true data. The method is applied to a vector of predicted values.
    • ClassificationScore — computes the classification metric to evaluate the quality of the predicted data compared to the true data.
     
  2. Fixed data saving to a text file in the UTF-8 format using the FileWrite function.
  3. Disabled and deprecated Signal* functions. They will now return empty signal sets.

MetaEditor

  1. Increased sampling rate for profiling. The profiler now captures application states 10,000 times per second, enabling more accurate measurement of function execution rates.
  2. Updated available models in the automatic coding AI assistant. Added ChatGPT-4 Turbo model, removed outdated implementations.
  3. Fixed errors when replacing words in a selected text fragment.

Tester

  1. Fixed forward testing freezing, which could occur in generic optimization mode.
  2. Optimized and accelerated operations with the trading history from MQL5 programs.
  3. Fixed profit calculations for Close By operations. An error could occur for trading instruments not matching the main testing symbol.

Web Terminal

  1. Fixed update of trading symbol properties upon the relevant property changes on the broker's side.
  2. Fixed display of candlestick bodies on the chart. The chart could fail to display small bodies.
  3. Fixed operation of the Country field in the account opening form.

15 December 2023

Presenting the book "MQL5 Programming for Traders"

We have released the most comprehensive guide to MQL5 programming, authored by experienced algorithmic trader Stanislav Korotky with MetaQuotes' support.

The book is intended for programmers of all levels. Beginners will learn the fundamentals as the book introduces key development tools and basic programming concepts. With this material, you can create, compile, and run your first application in the MetaTrader 5 trading platform. Users with experience in other programming languages can immediately advance to the applied part related to creating trading robots and analytical applications in MQL5.

Presenting the book "MQL5 Programming for Traders"

The book is freely available online, under the "Book" section of the MQL5.community website. It consists of seven parts:

  1. Introduction to MQL5 and development environment – an overview of the basic principles of MQL5 programming and the MQL5 development environment, including MetaEditor's editing and compiling features.
  2. Fundamentals of MQL5 programming – the basic concepts, including data types, instructions, operators, expressions, variables, code blocks, and program structures applied for procedural-style MQL5 program development.
  3. Object-oriented programming – distinctive features that set MQL5 apart despite its similarities with other languages supporting the OOP paradigm, especially with C++.
  4. Common functions – frequently used built-in functions that are applicable in any program.
  5. Creating application programs – an in-depth look at the architectural nuances of MQL5 programs and their specialization by types of trading-related tasks, such as technical analysis using indicators, chart management, and use of graphical objects, among others.
  6. Trading automation – how to analyze the trading environment and automate trading using robots.
  7. Advanced language tools – a set of specialized APIs aimed at facilitating MQL5 integration with related technologies, including databases, data exchange, OpenCL, and Python.

The book provides numerous source code examples. Following the explanation, you can implement your own applications in the built-in editor and instantly view program execution results in the platform. The source codes are available in the public project \MQL5\Shared Projects\MQL5Book and in the Code Base.

Start learning MQL5 right now and discover the world of professional algorithmic trading. The knowledge gained will help you bring your ideas to life. You can also apply them in a commercial environment by developing and selling applications through the Market and taking on programming orders in the Freelance.


9 November 2023

Download MetaTrader 5 for macOS and Linux

We have prepared special trading platform installers quite some time ago. The installer for macOS is a full-fledged wizard with which the app is installed seamlessly, just like a native one. For Linux, we provide a script that can be downloaded and launched with a single command.

The installers perform all the required steps: they identify the user's system, download and install the latest Wine version, configure it, and then install MetaTrader inside it. All steps are completed in the automated mode, and you can start using the platform immediately after installation.

The installer links are available on the https://www.metatrader5.com website and in the trading platform's Help menu:



For macOS: Check your Wine version

We have recently completely updated the macOS installer, incorporating numerous improvements. If you are already using MetaTrader on macOS, please check the current Wine version, which is displayed in the terminal log upon startup:

LP 0 15:56:29.402 Terminal MetaTrader 5 x64 build 4050 started for MetaQuotes Software Corp.
PF 0 15:56:29.403 Terminal Windows 10 build 18362 on Wine 8.0.1 Darwin 23.0.0, 12 x Intel Core i7-8750H  @ 2.20GHz, AVX2, 11 / 15 Gb memory, 65 / 233 Gb disk, admin, GMT+2

If your Wine version is below 8.0.1, we strongly recommend removing the old platform along with the Wine prefix in which it is installed. You can delete the platform as usual by moving it from the "Applications" section to the bin. The Wine prefix can be deleted using Finder. Select the Go > Go to Folder menu and enter the directory name: ~/Library/Application Support/. Go to this directory and delete the following folders based on the installed MetaTrader version:

~/Library/Application Support/Metatrader 5
~/Library/Application Support/net.metaquotes.wine.metatrader5
~/Library/Application Support/Metatrader 4
~/Library/Application Support/net.metaquotes.wine.metatrader4

After that, reinstall the terminal using our installers.

  • During the process, you will be prompted to install additional Wine packages (Mono, Gecko). Please agree to this as they are necessary for proper functioning.
  • The minimum macOS versions are Big Sur for MetaTrader 4 and Mojave for MetaTrader 5.


You no longer need to search for manual installation instructions or use third-party solutions. You can install the platform in a couple of clicks and instantly start trading:

8 November 2023

MetaTrader 5 for iPhone/iPad: Bulk operations, 21 timeframes, and trading notifications

We continuously enhance the MetaTrader 5 mobile app for iOS by adding valuable trading and analytical features. In the past six months, we have introduced bulk trading operations, extra timeframes, trading notifications, and more. Here is a detailed overview of all these innovations.

  1. Bulk position closing and order deletion. The app now supports bulk operations for positions and orders. For example, you can close all open positions with just a couple of taps upon important news releases and thus promptly lock in profits. You can also quickly cancel all pending orders to prevent them from being triggered due to sharp price movements.

    To access bulk operations, tap the three dots in the positions or orders section or open the context menu for a specific operation.


    Bulk position closing and order deletion


  2. Trading notifications. Turn on notifications to always stay informed about trading operations on your account. The information is delivered in push notifications from the broker's server and thus you can receive it even when the app is not running. Depending on the settings provided by the broker with whom the selected account is opened, notifications may include information about orders, deals, deposits, and withdrawals. Notifications are enabled separately for each account; the setting is saved on the server.


    Trading Notifications


  3. Profit/loss for stop levels. When moving the Take Profit and Stop Loss levels, you will immediately see the potential profit/loss you will incur if the level triggers. The values are displayed in points and monetary terms.


    Profit/loss for stop levels


  4. Trading panel improvements. New settings enable the positioning of the trading panel above or below the chart. We have also increased the distance between the volume change options and the Buy and Sell buttons to avoid accidental order sending.


     Trading panel improvements


  5. Support for 21 timeframes. We have added 12 additional minute and hour timeframes to offer more options for price analysis. To add your preferred periods to the quick access panel, go to the timeframe menu above the chart and select them with a long press.


    The number of timeframes has increased to 21


  6. Advanced customization of trading levels. You can now individually enable/disable the display of position levels, pending orders, and Stop Loss/Take Profit levels.


    Advanced customization of trading levels


  7. Screen lock. You can set a PIN code or use Face ID/Touch ID to prevent other users from accessing the app. If someone gains access to your iPhone or iPad, your trading account will remain secure. To activate this feature, turn on 'Screen Lock' in the Settings/About window and set a four-digit PIN. If the app remains hidden for over a minute, you will need to enter the PIN or unlock the app using Face ID/Touch ID.


    Screen lock


  8. Chat improvements. Several new features have been introduced in the built-in messenger which enables communication between MQL5.community members:

    • Ability to block a user in a personal chat and view a list of blocked users.
    • Display of user data when tapping on the user avatar.
    • Ability to report a message in chat by long-pressing it.
    • An additional menu for new chats created by users who are not on your friends list. If you receive such a chat, you can immediately add the user to friends or block and report them.
    • Display of the number of unread messages on the section icon in the app settings.


    Chat improvements


  9. Links to brokers' regulatory documents. You can now access all the necessary legal information from your broker directly in the account properties section of your mobile app. The availability of links depends on your broker.
  10. Numerous improvements and fixes. Over the past six months, dozens of improvements have been introduced to guarantee stable and swift app performance.


Install the latest app version and unlock extended trading capabilities:

MetaTrader 5 in App Store MetaTrader 5 in App Store

6 November 2023

MetaTrader 5 for Android: New trading and analytics features

Over the past six months, a vast array of new features has been introduced to the MetaTrader 5 mobile app for Android. These include fast on-chart trading features, additional timeframes, visual representation of trading history, and more. A detailed overview of these updates is provided below.

  1. One-click trading from the chart. A deal can now be performed by simply opening a special panel and pressing Buy or Sell. This means you can seize opportunities instantly without wasting precious time switching between tabs.


    One-click trading from the chart


    The results of quick operations are displayed immediately in pop-up notifications on the chart. If you find the notifications unnecessary, you can disable them in the app settings. Also, using the settings, you can place the trading panel above or below the chart.

  2. Placing pending orders from the chart. You can now place pending orders visually by dragging them to the desired levels on the chart. Tap the button on the top panel, select the order type, set the price, and tap the arrow to confirm the parameters. This method is considerably faster than configuring parameters through a trading dialog. You can immediately set Stop Loss and Take Profit for the order. Likewise, you can modify any existing order by simply tapping on its level and setting new parameters.


    Placing pending orders from a chart


  3. Managing positions and orders from the chart. Select a position or order level on the chart, and a control panel will appear at the chart bottom. From this panel, you can close positions and delete orders, as well as add and remove their Stop Loss and Take Profit levels. When moving stop levels, you will immediately see the potential profit/loss in points and monetary terms.


    Closing positions and removing pending orders from the chart


  4. Trading history on the chart. Now, you can visually evaluate your market entries and exits. If you enable the history display in the app settings, all trades will be represented as arrows on the chart. The trade direction is indicated by color: blue for Buy and red for Sell. Entry and exit trades are connected by dotted lines. Additionally, you can choose to display open positions and active pending orders in the chart settings.


    Trading history on the chart


  5. Bulk position closing and order deletion. The app now supports bulk operations for positions and orders. For example, you can close all open positions with just a couple of taps upon important news releases and thus promptly lock in profits. You can also quickly cancel all pending orders to prevent them from being triggered due to sharp price movements.

    To access bulk operations, tap the three dots in the positions or orders section or open the context menu for a specific operation.


    Bulk position closing and order deletion


  6. Adaptive trading volume editing. The buttons for modifying volumes in the trading dialog now automatically adjust to the current volume value. The larger the volume, the more units are added or subtracted with each button tap.


    Adaptive trading volume editing


  7. Support for 21 timeframes. We have added 12 additional minute and hour timeframes to offer more options for price analysis. To add your preferred periods to the quick access panel, go to the timeframe menu above the chart and configure them.


    The number of timeframes has increased to 21


  8. Copying analytical objects on the chart. The new option enables faster chart markup. Open the object menu with a long press and select "Copy":


    Copying analytical objects on the chart


  9. Improved right chart border adjustment. To change the chart border shift, simply scroll the chart to the last price until a vertical separator appears. Next, drag the triangle at the bottom chart scale:


    Improved right chart border adjustment


  10. Account connection via a QR code. You can now transfer your account from the desktop platform or from another device by scanning a QR code. The account will be connected instantly without the need to enter a login and password. To access the QR code, tap the corresponding icon in the account properties.


    Account connection via a QR code


  11. Updated color schemes. The entire interface has been redesigned with special attention to color selection, ensuring a comfortable working environment. The app now supports a dark theme that activates automatically when you enable the dark theme on your device. Additionally, we have added settings for customizing the colors of all lines on the chart.


    Updated color schemes


  12. Links to brokers' regulatory documents. You can now access all the necessary legal information from your broker directly in the account properties section of your mobile app. The availability of links depends on your broker.
  13. Adjustments for Arabic and Persian languages. We have implemented various enhancements to ensure the app interface is correctly displayed in languages using right-to-left scripts.
  14. Numerous improvements and fixes. Over the past six months, hundreds of improvements have been introduced to guarantee stable and swift app performance.


Install the latest app version and unlock extended trading capabilities:

MetaTrader 5 on Google Play MetaTrader 5 in Huawei App Gallery APK file
Google Play Huawei App Gallery APK file

20 October 2023

MetaTrader 5 build 4040: Improvements and fixes

Terminal

  1. New trading report improvements. Fixed display of the first value on the growth graph and drawdown calculations.



  2. When opening accounts, traders receive several messages through the internal email system. They provide credentials and useful information about the platform capabilities and built-in services. We have updated and enhanced these emails, translated them into 50 languages, and completely updated the design.
  3. Optimized account deposit and withdrawal pages.
  4. Fixed volume change error when placing a new order. With some combinations of trading instrument settings, the field was not available for editing.
  5. Fixed display of broker agreement links in the demo account opening dialog.
  6. Updated user interface translations.

MQL5

  1. Fixed an error that could cause the MQL5 program to crash at startup under certain conditions.

MetaTrader 5 Web Terminal

  1. Fixed display of Stop Loss and Take Profit values in trading history.
  2. Enhanced logging. New log messages display information on successful and failed connections.
  3. Fixed context menu operation in the Market Watch.
  4. Fixed display of notifications about operation results when trading from the Depth of Market.
  5. Fixed error which caused the indicator subwindow to be removed from the chart when calling the trading dialog.
  6. Fixed on-chart dragging of trading levels displayed on top of analytical objects.

29 September 2023

MetaTrader 5 build 4000: Trading Report and Web Terminal improvements

Terminal

  1. Added display of monthly funds growth in new trading reports. To view the metrics, go to the Summary report and select the Balance mode.


    Monthly funds growth in the new trading report

  2. Fixed and improved display of the new trading report.
  3. ONNX Runtime updated to version 1.16. For release details, see GitHub.
  4. Updated user interface translations.

MetaTrader 5 Web Terminal

  1. Fixed display of password change and account opening dialogs.
  2. Fixed display of Stop Loss and Take Profit values in history. An error could occur after the modification of the relevant levels.
  3. Added scroll in the risk warning dialog.
  4. Updated user interface translations.
  5. Other improvements and fixes.

21 September 2023

MetaTrader 5 build 3980: Improvements and fixes

Terminal

  1. New trading report improvements. Fixed the display of the total swaps value and the profit chart by symbols.
  2. Optimized deposit and withdrawal pages. For further details about the new platform integration with payment systems, please read the build 3950 release notes.
  3. Optimized recalculations of financial operations across the entire platform, including the strategy tester. Now profit, margins, and many other parameters are calculated faster.
  4. Updated user interface translations.

MQL5

  1. Added Conjugate methods for complex, vector<complex> and matrix<complex> types. They implement complex conjugate operations.
    //+------------------------------------------------------------------+
    //| Script program start function                                    |
    //+------------------------------------------------------------------+
    void OnStart()
      {
       complex a=1+1i;
       complex b=a.Conjugate();
       Print(a, "  ", b);
       /*
       (1,1)  (1,-1)
       */
    
       vectorc va= {0.1+0.1i, 0.2+0.2i, 0.3+0.3i};
       vectorc vb=va.Conjugate();
       Print(va, "  ", vb);
       /*
       [(0.1,0.1),(0.2,0.2),(0.3,0.3)]  [(0.1,-0.1),(0.2,-0.2),(0.3,-0.3)]
       */
    
       matrixc ma(2, 3);
       ma.Row(va, 0);
       ma.Row(vb, 1);
       matrixc mb=ma.Conjugate();
       Print(ma);
       Print(mb);
       /*
       [[(0.1,0.1),(0.2,0.2),(0.3,0.3)]
        [(0.1,-0.1),(0.2,-0.2),(0.3,-0.3)]]
    
       [[(0.1,-0.1),(0.2,-0.2),(0.3,-0.3)]
        [(0.1,0.1),(0.2,0.2),(0.3,0.3)]]
       */
       
       ma=mb.Transpose().Conjugate();
       Print(ma);
       /*
       [[(0.1,0.1),(0.1,-0.1)]
        [(0.2,0.2),(0.2,-0.2)]
        [(0.3,0.3),(0.3,-0.3)]]
       */
      }
  2. Added handing of ONNX model outputs of the 'Sequence of maps' type.

    For ONNX models that provide Map sequences in the output layer (ONNX_TYPE_SEQUENCE of ONNX_TYPE_MAP), a dynamic or fixed array of structures should be passed as the output parameter. The first two fields of this structure must match the ONNX_TYPE_MAP key and value types and be fixed or dynamic arrays.

    Consider the iris.onnx model created by the following Python script:
    from sys import argv
    data_path=argv[0]
    last_index=data_path.rfind("\\")+1
    data_path=data_path[0:last_index]
    
    from sklearn.datasets import load_iris
    iris_dataset = load_iris()
    from sklearn.model_selection import train_test_split
    X_train, X_test, y_train, y_test = train_test_split(iris_dataset['data'], iris_dataset['target'], random_state=0)
    from sklearn.neighbors import KNeighborsClassifier
    knn = KNeighborsClassifier(n_neighbors=1)
    knn.fit(X_train, y_train)
    
    #  Convert into ONNX format
    from skl2onnx import convert_sklearn
    from skl2onnx.common.data_types import FloatTensorType
    initial_type = [('float_input', FloatTensorType([None, 4]))]
    onx = convert_sklearn(knn, initial_types=initial_type)
    path = data_path+"iris.onnx"
    with open(path, "wb") as f:
        f.write(onx.SerializeToString())
    Open the created onnx file in MetaEditor:

    Viewing the ONNX model in MetaEditor


    The Map sequence is passed as "output_probability". It has a key of INT64 type (which corresponds to long in MQL5) and the float type value. To receive data from this output, declare the following structure:
    struct MyMap
      {
       long              key[];
       float             value[];
      };
    Here we used dynamic arrays with appropriate types. In this case, we can use fixed arrays because the Map for this model always contains 3 key+value pairs.

    Since the Map sequence is returned, an array of such structures should be passed as a parameter for receiving data from output_probability output. This array can be dynamic or fixed, in accordance with the properties of a particular model. Example:
    //--- declare an array to receive data from the output layer output_probability
    MyMap output_probability[];
    
    ...
    
    //--- model running
    OnnxRun(model,ONNX_DEBUG_LOGS,float_input,output_label,output_probability);

MetaEditor

  1. Fixed display of output types in the ONNX model viewer.

MetaTrader 5 Web Terminal build 3980

  1. Added Contact Broker section in the web terminal's main menu.
  2. Added error handling for SSL authentications. This authentication type is not supported in the web terminal. One-time passwords can be used instead.
  3. Fixed desktop platform download link in the main menu.
  4. Fixed accounts managing dialog. If the broker does not provide the demo or real account opening option, the relevant menu item will be hidden.

14 September 2023

MetaTrader 5 Build 3950: Deposits/withdrawals in the terminal and updated trading report

Terminal

  1. Added support for balance operations for depositing/withdrawing funds from a trading account directly in the client terminal.

    We have added integration of the most popular payment systems directly into the MetaTrader 5 platform, which allows brokers to provide traders with a new level of service. When depositing or topping up, simply select the method that suits you best and complete the transaction. For more convenience, traders can save selected cards so as not to enter card details each time. Brokers do not store payment details and card numbers. The payment data entered by a user is sent over a secure channel to the user-selected payment system.

    The new functionality provides traders with the opportunity to manage funds in one click without leaving the client terminal.



  2. Completely revamped the trading history report. Now it is more easy to view. We have revised the approach to presenting information and converted dry statistical reports into interactive graphs and diagrams. The work is still in progress, but you can evaluate the changes already.

    To view trading statistics, click Reports in the View menu.






    The report is divided into four tabs, each containing aggregated information:

  3. Added the usage of AVX2 instructions in case they are supported by CPU. This allows for more efficient use of CPU capabilities the terminal is launched on. Now, when installing or updating, the terminal determines the CPU architecture on its own and installs the most optimal version. During the launch, the terminal sends a message (AVX/AVX2) to the log displaying the set of instructions the terminal is built for.
    Terminal	MetaTrader 5 x64 build 3914 started for MetaQuotes Software Corp.
    Terminal	Windows 10 build 19045, 20 x Intel Xeon  E5-2630 v4 @ 2.20GHz, AVX, 41 / 63 Gb memory, 58 / 280 Gb disk, UAC, GMT+2
    

    Advanced Vector Extensions (AVX) is an extension of the x86 instruction set for Intel and AMD microprocessors proposed back in 2008. Further development has led to the appearance of AVX2 and AVX-512 (2013).

  4. In addition to the two versions of MetaTrader 5 terminals on X64 and AVX, we have released the third version of the desktop terminal compiled with direct support for AVX2 commands. At the same time, ONNX models now also work with support for AVX2 commands.
  5. Added display of links to the broker's necessary regulatory documents. You can now obtain all the necessary legal information from your broker directly in the client terminal in Help / Terms & Conditions.




  6. Fixed 2FA authorization in case of the additional use of the extended authorization using certificates.
  7. Fixed display of internal mail messages when working on MacOS.
  8. Fixed display of the Signals window when working in Wine.
  9. Released new MetaTrader 4 and 5 installers for Linux.
  10. Added commands for visiting Linux and Mac terminal version download pages in Help. For traders' convenience, we have created a special section of the website with terminal versions for all platforms, as well as for trading in a browser.




  11. Fixed embedding images into internal mail.
  12. Released new MetaTrader 5 terminal installers for Mac with support for M1/M2 processors. Due to the transition to Wine 8.0.1, we strongly recommend that you remove old versions and install new ones. When using Wine versions older than 8.0.0, a message about the need for an update is displayed in the terminal log.
  13. Added "VPS Hosting Speed Up" in the network scan menu indicating the ping to your trading server. This allows you to clearly see how your network delays decrease when renting a built-in VPS.




  14. Strengthened the requirements for minimum password complexity, namely:

    • password length — at least 8 characters
    • the password must contain at least 1 character in upper and lower case, at least 1 digit and at least 1 special character.

  15. Usable links in terminal logs. Now when double-clicking on lines with https links, users are sent to their browsers and the link is opened.
  16. Fixed search for trading instruments in Market Watch. Now the symbol is first searched by name, and then by other fields: description, ISIN, etc.
  17. Fixed accounting for profit on trades when calculating the balance in account trading history reports. In some cases, the instrument type was not taken into account in the calculations.

VPS Hosting

  1. Added the ability to send and run EX5 programs compiled under the x64/AVX/AVX2 command set. Programs for AVX512 are not supported on the built-in VPS.
  2. Increased the number of locations for renting the built-in VPS up to 27. Now the selection of the closest server has become even wider.

MQL5

  1. Added control of compilation settings, including selection of extended processor instruction sets — AVX, AVX2, AVX512 and FMA3.

    Modern CPUs have a set of advanced instructions that significantly speed up mathematical calculations, but the vast majority of modern programs do not use these capabilities. We have added support for these instructions to the MQL5 language compiler, which allows for more efficient and faster code generation.

    We have also added the ability to choose which type of instructions to compile an MQL5 program with. You can specify both general settings for single programs in MetaEditor Options, and apply personal ones in project settings:



  2. Added the ENUM_AVERAGE_MODE and ENUM_CLASSIFICATION_METRIC enumerations to the Matrix and Vector Methods.
  3. Added Set method for vectors.
  4. Revised OpenCL initialization - now it is initialized by the first actual use, not by loading an MQL5 program containing OpenCL functions.
  5. Fixed an error when calling the SocketIsConnected function.
  6. Fixed delay in calling the OnDeinit method when unloading custom indicators.
  7. Fixed a compiler error, which caused incorrect calculation of the string length in the indicator_label property leading to incorrect display of tooltips for graphical objects.
  8. Fixed the use of multi-line comments in the macro body. An example of a macro where the error occurred:
    #define MACRO1 /*
    #define MACRO2 */
    void OnStart()
    {
    #ifdef MACRO2
        Print( 2 );
    #else
        Print( 1 );
    #endif
    }
  9. Fixed the order of parameters of the MathAtan2 function. The order now matches the similar function in C++.
  10. Added the new TERMINAL_CPU_ARCHITECTURE value to the ENUM_TERMINAL_INFO_STRING enumeration. Also, added the  __CPU_ARCHITECTURE__ macro — obtaining the CPU architecture of the computer the terminal is running on. Example of use:
    void OnStart()
      {
       Print("CPU name:         ",TerminalInfoString(TERMINAL_CPU_NAME));
       Print("CPU cores:        ",TerminalInfoInteger(TERMINAL_CPU_CORES));
       Print("CPU architecture: ",TerminalInfoString(TERMINAL_CPU_ARCHITECTURE));  
       Print("");
       Print("EX5 architecture: ",__CPU_ARCHITECTURE__);                            
      }
    
    CPU name:         12th Gen Intel Core i9-12900K
    CPU cores:        24
    CPU architecture: AVX2 + FMA3
    
    EX5 architecture: AVX

  11. Changed the extern modifier behavior. Now declaration of a variable with the extern modifier is a variable pre-declaration.

    New restrictions:
    1. The variable pre-declaration should not contain initialization. For example, when compiling the code below, we get the error "X - extern variable initialization is not allowed":
      extern int X=0;
      
      void OnStart()
        {
        }

    2. The 'extern' variable should be declared in the program without the 'extern' keyword. For example, when compiling the code below, we get the error "unresolved extern variable X":
      extern int X;
      
      void OnStart()
        {
        }

    3. When using 'extern', it is important to pay attention to the initialization order, because a variable can be accessed before it is initialized. For example, the following code will yield "Y=0 X=5" in the log since initialization of variable Y occurs before initialization of variable X:
      extern int X;
      int        Y=X;
      
      void OnStart(void)
        {
         Print("Y=",Y," X=",X);
        }
        
      int X=_Digits;

MetaEditor

  1. Added the usage of AVX2 instructions in case they are supported by CPU.
  2. Fixed an error occasionally causing freezes during compilation.
  3. Improved display of local variables when debugging.

Tester

  1. Added the usage of AVX2 instructions in case they are supported by CPU.

Updated user interface translations.

Fixed errors reported in crash logs.


MetaTrader 5 Web Terminal build 3950

  1. Added display of the Ask price to the chart settings.



  2. Accelerated initial terminal loading.
  3. Added the ability to change the password.
  4. Added the ability to delete and save the password.
  5. Added a custom period for displaying trading history.
  6. Fixed forced password change.
  7. Fixed calculation of diff — the distance between the open price and TP/SL levels.



  8. Fixed ticks stop error when closing all orders/deals.
  9. Fixed display of Economic calendar events. Sometimes, they were not displayed on the chart despite the option being enabled.
  10. Fixed indicator reset when changing a chart symbol.
  11. Fixed an error in the form of opening a real account when confirming the phone/email.
  12. Added new translations and corrected existing ones.

8 June 2023

MetaTrader 5 build 3800: Book or Cancel orders, AI coding assistant, and enhanced ONNX support

Terminal

  1. Added support for the new order filling policy — Passive / Book or Cancel (BOC).


    New order filling policy — Passive / Book or Cancel


    The BOC policy indicates that an order can only be placed in the Depth of Market (order book). If the order can be filled immediately when placed, this order is canceled. This policy guarantees that the price of the placed order will be worse than the current market price. BOC is used to implement passive trading: it is guaranteed that the order cannot be executed immediately when placed and thus it does not affect current liquidity. This filling policy is only supported for limit and stop limit orders in the Exchange Execution mode.

    The availability of the new filling policy depends on the broker.

  2. The platform switches to using Microsoft Edge WebView2 for displaying the HTML content.

    Compared to the outdated MSHTML, the new component significantly expands content displaying capabilities by providing access to modern technologies. The use of WebView2 improves the appearance of some platform sections, increases performance, and creates a more responsive interface. In particular, the new component will affect the Market, Signals and VPS sections.
    Full support for WebView2 was introduced in Windows 10. We strongly recommend that all users upgrade to the latest operating system version and install all available updates. The platform will continue to use MSHTML under Windows 7 and Wine, but the new features will not be available. The minimum recommended operating system version is Windows 10 21H2 (build 19044, November 2021).

  3. Improved Market security system. Now, in order to run the product, the user must be authorized in the platform with the same MQL5 account via which the product was purchased. The account must be specified under the Tools \ Options \ Community section:


    Specify your MQL5 account in the platform settings


    If no account or an invalid account is specified, the product will not start, and the following message will be printed in the platform journal:
    'ProductName' requires active MQL5 account in Tools->Options->Community
  4. Added Overview command to the history section context menu. The command opens a trading report for the account:


    Command to go to the trading report


  5. Fixed display errors in the two-factor authentication dialog. If the terminal had several accounts with the same number but opened with different brokers, the account connection form could fail to display the one-time password field.
  6. Implemented faster rendering of indicators with the DRAW_COLOR_CANDLES display style.
  7. Fixed trading report creation errors. On-chart profit and equity values could be displayed incorrectly under certain conditions.
  8. Added display of Costs in the trading report. The value shows the total costs incurred when performing deals relative to the symbol's current mid-point price (mid-point spread cost). This is the amount which the trader lost due to the spread. The availability of this value depends on the broker.
  9. Updated UI translations.
  10. Improved stability under Wine, especially on macOS systems. We recommend completely removing old terminals and re-installing them:


  11. Accelerated package installation and updates downloading procedures. Improved analysis of AVX availability on the user's computer when selecting a distribution package.
  12. Enabled support for TLS 1.3 in web protocols. TLS 1.0 is considered deprecated and insecure and has therefore been disabled.
  13. Fixed accounting for agent commissions in trading history reports. The relevant transactions could be ignored when calculating the final profit.
  14. Fixed the inability to change the server in the account connection dialog. The issue arose when there were several accounts in the terminal with the same number from different brokers.
From this build onwards, the installers will work only with 64-bit platform versions. Support for 32-bit versions will be discontinued. Previously installed 32-bit platform versions will work until January 1, 2024.

MQL5

  1. Added new STAT_COMPLEX_CRITERION value in the ENUM_STATISTICS enumeration. Use the property to obtain the calculated complex criterion value, as a result of optimization.
  2. Improved RegressionMetric method used for calculating the regression metric based on the passed matrix or vector. Added vector_true and matrix_true parameters for passing true values which evaluate the predicted data quality.
    double vector::RegressionMetric(
       const vector& vector_true,            // true values
       const ENUM_REGRESSION_METRIC  metric  // metric
       );
     
    double matrix::RegressionMetric(
       const matrix& matrix_true,            // true values
       const ENUM_REGRESSION_METRIC metric   // metric
       );
     
    vector matrix::RegressionMetric(
       const matrix& matrix_true,            // true values
       const ENUM_REGRESSION_METRIC metric,  // metric
       const int                      axis   // axis
       );
  3. Added the LinearRegression method. It returns a vector/matrix with calculated linear regression values for the passed vector/matrix.
    vector vector::LinearRegression();
     
    matrix matrix::LinearRegression(
       ENUM_MATRIX_AXIS axis=AXIS_NONE       // axis along which regression is calculated 
       );
    Example:
    vector vector_a;
    //--- fill the vector with prices
    vector_a.CopyRates(_Symbol,_Period,COPY_RATES_CLOSE,1,100);
    //--- get a linear regression
    vector vector_r=vector_a.LinearRegression();
    The results are visualized in the graph:


    Visualizing the result returned by the LinearRegression method


  4. Added the HasNan method, which returns the number of NaN values in a matrix/vector.
    ulong vector::HasNan();
    ulong matrix::HasNan();
    When comparing the appropriate pair of elements having NaN values, the Compare and CompareByDigits methods consider these elements equal, while in case of a usual comparison of floating-point numbers NaN != NaN.

  5. Modified the OnnxTypeInfo structure which is used for operations with ONNX (Open Neural Network Exchange) models:

    struct OnnxTypeInfo
      {
       ENUM_ONNX_TYPE       type;            // parameter type
       OnnxTensorTypeInfo   tensor;          // tensor description
       OnnxMapTypeInfo      map;             // map description
       OnnxSequenceTypeInfo sequence;        // sequence description
      };

    The data type is specified in the structure using new substructures:

    • OnnxTensorTypeInfo — tensor
    • OnnxMapTypeInfo — map
    • OnnxSequenceTypeInfo — sequence

    struct OnnxTensorTypeInfo
      {
       ENUM_ONNX_DATATYPE   data_type;       // data type in the tensor
       long                 dimensions[];    // number of elements
      };
    
    struct OnnxMapTypeInfo
      {
       ENUM_ONNX_DATA_TYPE  key_type;        // key type
       OnnxTypeInfo         type_info;       // value type
      };
    
    struct OnnxSequenceTypeInfo
      {
       OnnxTypeInfo         type_info;       // data type in the sequence
      };
    Depending on OnnxTypeInfo::type (ONNX_TYPE_TENSOR, ONNX_TYPE_MAP or ONNX_TYPE_SEQUENCE), the relevant substructure is filled.

  6. Improved support for ONNX models.
  7. Added CopyIndicatorBuffer methods which enable the obtaining of indicator buffer data into a vector.
    bool vector<T>::CopyIndicatorBuffer(long indicator_handle,ulong buffer_index,ulong start_pos,ulong count);
    bool vector<T>::CopyIndicatorBuffer(long indicator_handle,ulong buffer_index,datetime start_time,ulong count);
    bool vector<T>::CopyIndicatorBuffer(long indicator_handle,ulong buffer_index,datetime start_time,datetime stop_time);
  8. Fixed operations with arrays having two or more dimensions in the FrameAdd and FrameNext methods.
  9. Fixed CRedBlackTree::Remove Standard Library method.
  10. Implemented fixes in the Fuzzy Logic library.

MetaEditor

  1. Added integration with the advanced automatic coding AI Assistant. Its operation is based on OpenAI models. Enter a comment or part of a function and send a prompt. The neural network will analyze the prompt and will offer coding options to implement the idea.

    Depending on the file type, the string "MQL5 language", "Python language" or "C++ language" is automatically inserted at each prompt beginning. Thus, the neural network will provide the result in the required language.

    AI Assistant is currently free and is already enabled in the editor. There are several options available under Tools \ Options \ AI Assistant:


    AI Assistant settings


    Payment settings:

    • Use your MQL5 account: this option is currently available for free. Later, you will be able to pay for the subscription directly from your MQL5 account balance.
    • Use an OpenAI key, if you have purchased a subscription and have the relevant key.

    Prompt settings:

    • Model — a neural network which will process your requests. text-davinci-003 and gpt-3.5-turbo are currently available. Support for gpt-4 will be added soon.
    • Maximum tokens — the number of text units which the model can return in response to a prompt.
    • Variability — affects how strictly the neural network will follow the prompt. The bigger the value, the greater the result randomness. This option corresponds to the temperature parameter in OpenAI models.

  2. Added ability to view the properties of ONNX models.

    You can view the contents of the *.onnx file directly in the editor. As an example, find the project ONNX.Price.Prediction under Toolbox \ Public Projects and select Join in the context menu. The project will be downloaded to your computer and will appear in the Navigator.


    Open ONNX models directly in MetaEditor


  3. Added ability to visualize machine learning models and neural networks using Netron. This viewer supports popular models, including ONNX, TensorFlow Lite, Caffe, Keras and ncnn, among others.

    To view a model, select its file in the Navigator and click "Open in Netron". If this utility is not installed, its GitHub page will open, from which you can download the relevant installer, according to your operating system. For example, use Netron-Setup-X.X.X.exe for Windows. If the program is installed, the model will immediately open for viewing from the Navigator.


    Visualize machine learning models with Netron


    Supported formats:

    • armnn, caffemodel, circle, ckpt, cmf, dlc, dnn, h5, har, hd5, hdf5, hn, keras, kmodel,
    • lite, mar, meta, mge, mlmodel, mlnet, mlpackage, mnn, model, nb, ngf, nn, nnp,
    • om, onnx, ort, paddle, param, pb, pbtxt, pdiparams, pdmodel, pdopt, pdparams, prototxt, pt, pth, ptl,
    • rknn, t7, tfl, tflite, tmfile, tm, tnnproto, torchscript, uff, xmodel

  4. Updated UI translations.

Tester

  1. Fixed calculation of the "Average losing trade" metric in the testing report. Previously, the calculation could erroneously include entry deals if commissions were charged for such deals.
  2. Improved custom commission options in the strategy tester. To set a symbol, specify its name rather than the entire path.
  3. Updated icons in the strategy tester. New metaphors will make them easier to understand.

Fixed errors reported in crash logs.

Web Terminal

  1. Improved trading history section:

    • Added display of balance operations in the trading history, such as deposits and withdrawals, commissions, and adjustments.
    • Added display of totals in the trading history: balance, profit, commission, deposits, withdrawals and number of orders, among others.
    • Added ability to sort operations and filter the history by depth in the mobile version.


    Updated trading history section


  2. Enhanced symbol contract specifications. The following information has been added: volume limit, tick size and value, initial and hedged margin.
  3. Improved color schemes:

    • Pending orders are displayed in gray on the chart. The position color depends on the direction: red for Sell and blue for Buy. The new colors provide easier navigation especially if a lot of operations are displayed on the chart.
    • When viewing/editing a position, only this position and its levels are highlighted, while all other positions and orders become gray, and their levels are hidden from the price scale. Thus, it will be easier to manage separate operations.
    • The Stop Loss color has been changed from red to orange to avoid confusion with Sell positions.
    • Improved on-chart icons indicating position closing time. A green icon is used for positions closed by Take Profit and a red one is used for those closed by Stop Loss.

  4. Added interface translations into Arabic, Bulgarian, Vietnamese, Greek, Indonesian, Malay, Dutch, Persian, Polish, Thai, Ukrainian and Hindi. The web terminal is now available in 24 languages.
  5. Fixed Turkish UI translations.
  6. Fixed modification and deletion of pending orders in the Web Terminal mobile version.
  7. Fixed on-chart 'closed market' tooltip.
  8. Fixed display of profits in the position close button in the trading dialog. The error occurred during partial closing.
  9. Fixed display of on-chart trading notifications.
  10. Fixed volume modification using arrows in the Depth of Market.
  11. Fixed error which could cause the settings of running indicators to be reset under certain conditions.
  12. Fixed username checks when opening new accounts. Previously, an apostrophe in the name was considered an error.
  13. Fixed processing of requotes. The dialog with the requoted prices might not be displayed under certain conditions.
  14. Fixed display of the Ichimoku Kinko Hyo indicator. The Chikou-Span, Up Kumo and Down Kumo lines will be displayed with the correct offset.
  15. Fixed initial margin checks when opening new orders. The error occurred in the hedging position accounting system.
  16. Fixed scrolling in the contract specification window.

MQL5.community

  1. The MQL5 Cloud Network website has been completely redesigned: https://cloud.mql5.com.

    Learn how to use the processing power of thousands of computers around the world to optimize your trading strategies. With the MQL5 Cloud Network, even the heaviest computations can be completed in a matter of minutes. Visit the website and find out how to participate in the network and how to earn money by providing your computer resources.


    Visit the updated MQL5 Cloud Network website


  2. Improved screenshot section in Market products. Authors can upload images up to 1920*1800 pixels to demonstrate how applications work. The screenshot gallery has also been updated. The carousel shows image thumbnails, and a click on them opens full-sized images.


    Improved screenshot section in the Market


  3. Freelance section improvements. Users will now receive more tips when placing their first orders:

    • Requirements specification examples and a reminder to add one
    • Order creation instructions
    • Template usage tips

    These tips can assist you in creating the order and in receiving the desired result.


    Freelance improvements




24 March 2023

MetaTrader 5 build 3660: Improvements and fixes

Terminal

  1. Fixed occasional incorrect platform log creation.
  2. Updated translations of the user interface.

MQL5

  1. Fixed checking global variables. When declaring identical variables in different namespaces, the compiler gave an erroneous warning that the variable was already declared.

Web Terminal

  1. Added user interface translation into Portuguese. The web terminal is now available in 12 languages.
  2. Fixed the dialog for adding Standard Deviation indicator.
  3. Minor fixes and improvements.
123456789