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

What's new in MetaTrader 5

27 September 2024

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.