MetaTrader 5 platform build 3540: 2FA/TOTP authentication and improved Market Watch in Web Terminal

What's new in MetaTrader 5

9 December 2022

Web Terminal

  1. Added support for 2FA/TOTP authentication using Google Authenticator and similar apps.

    The 2FA/TOTP authentication protects a trading account from unauthorized access even if its login and password are leaked. Authentication using Time-based One-time Password Algorithm (TOTP) can be implemented using various mobile apps. The most popular of them are Google Authenticator, Microsoft Authenticator, LastPass Authenticator and Authy. Now you can connect to your account in the MetaTrader 5 client terminal using one-time passwords generated by such Authenticator apps.

    To enable the two-factor authentication option, connect to your account via MetaTrader 5 Web Terminal. Then click on your account in the menu and select "Enable 2FA/TOTP" in the newly opened dialog. Run the Authenticator app on your mobile device, click "+" to add your trading account and scan the QR code from the terminal. Enter the generated code in the "One-time password" field and click "Enable 2FA". A secret will be registered for your account on the broker's trading server.


    Added support for 2FA/TOTP authentication using Google Authenticator and similar apps


    The saved secret will be used in the Authenticator app to generate an OTP code every time you connect to your account. Each password is valid for 30 seconds. After that a new one is generated.


    An additional OTP from the Authenticator app will be required for connecting to the account


    A backup code is also displayed in the QR code dialog for linking to the generator. Save it in a secure place. If you lose access to your linked device, the code will allow you to add your account to the Authenticator app again.

    If you decide to remove the stored secret from the Authenticator app, you should first disable 2FA/TOTP authentication using the appropriate account menu command. If the new 2FA/TOTP authentication method is not available on your account, please contact your broker.

  2. Expanded the amount of data displayed in the Market Watch. Now, in addition to the current Bid/Ask prices and the price change percentage, you can see:

    • Maximum and minimum Bid/Ask price for the current trading session
    • Open prices of the current trading session and close prices of the previous trading session

    Use the context menu to customize the displayed information:


    Additional Market Watch data


  3. Added risk notification display when a corresponding setting is enabled on the broker's side. Some regulators require that traders read and accept the notification before trading.
  4. Fixed display of the top toolbar on iPhone models featuring a notch at the top of the screen. Previously, it occasionally could cover the panel buttons.
  5. Fixed display of the account final financial parameters (profit, equity, etc.) in the Google Chrome browser. Sometimes, they were not updated.

Terminal

  1. Optimized and greatly accelerated the demo account opening dialog.
  2. Updated translations of the user interface.
  3. Fixes based on crash logs.

MQL5

  1. Added new methods to the COpenCL class of the Standard Library:

    • BufferFromMatrix — filling the device buffer with data from the matrix
    • BufferToMatrix — reading data from the device buffer into the matrix
    • ContextCreate — creating the device context (the first part of the Initialize method)
    • ProgramCreate — creating a program based on the OpenCL source code (the second part of the Initialize method)
    • ContextClean — releasing all data belonging to the device context (similar to the Shutdown method but without removing the context)
    • GetDeviceInfoInteger — receiving an integer device property
    • GetKernelInfoInteger — receiving an integer kernel property
    • GetDeviceInfo — receiving any single integer device property not present in the ENUM_OPENCL_PROPERTY_INTEGER enumeration

    GetDeviceInfo usage example:
    long preferred_workgroup_size_multiple=OpenCL.GetDeviceInfo(0x1067);
  2. Added the TERMINAL_CPU_NAME and TERMINAL_OS_VERSION values to the ENUM_TERMINAL_INFO_STRING enumeration. They allow receiving the user's CPU and OS names.
    void OnStart()
      {
       string cpu,os;
    //---
       cpu=TerminalInfoString(TERMINAL_CPU_NAME);
       os=TerminalInfoString(TERMINAL_OS_VERSION);
       PrintFormat("CPU: %s, OS: %s",cpu,os);
      }
    
    Result:
    CPU: Intel Xeon  E5-2630 v4 @ 2.20GHz, OS: Windows 10 build 19045
  3. Fixed operation of the "table_or_sql" parameter in the DatabasePrint and DatabaseExport functions. Now it is able to pass a table name in addition to a SQL query.

MetaEditor

  1. Fixed the check for the maximum number of displayable columns in the database. Up to 64 columns can now be displayed.
  2. Fixed operation of breakpoints in short constructions like IF[ if(cond) break; ].