---
title: "MetaTrader 5 build 3520: 2FA/TOTP authentication using Google Authenticator - Release Notes"
description: "The 2FA/TOTP authentication protects a trading account from unauthorized access even if its login and password are leaked - Release Notes"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
---

# MetaTrader 5 build 3520: 2FA/TOTP authentication using Google Authenticator

## The 2FA/TOTP authentication protects a trading account from unauthorized access even if its login and password are leaked

25 November 2022

### Terminal

1. Added 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)](https://en.wikipedia.org/wiki/Time-based_one-time_password) 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 and execute the "Enable 2FA/TOTP" command in the account context menu. 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. ](https://www.metatrader5.com/c/17/0/enable_2fa.png)

   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](https://www.metatrader5.com/c/17/0/otp_phone.png)

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

### MQL5

1. Fixed operation of the [CopyTicks](https://www.mql5.com/en/docs/series/copyticks) function for custom trading instruments. When working with [custom symbols](https://www.mql5.com/en/docs/customsymbols), previous session's initial ticks could be returned instead of requested data, under certain conditions.
2. Added new enumeration values to get the last OpenCL error code and text description.<https://www.mql5.com/en/docs/opencl/clgetinfostring#enum_opencl_property_string>
3. Fixed operation of the [matrix::MatMul](https://www.mql5.com/en/docs/matrix/matrix_products/matrix_matmul) method. When working with large matrices, the terminal could crash on certain sizes.

Fixed errors reported in crash logs.

**Earlier publications:**

- [MetaTrader 5 build 3510: Web Terminal improvements](https://www.metatrader5.com/en/releasenotes/terminal/2261)
- [MetaTrader 5 build 3500: Improvements and fixes](https://www.metatrader5.com/en/releasenotes/terminal/2259)
- [MetaTrader 5 build 3490: Mobile Web Terminal version and new matrix methods in MQL5](https://www.metatrader5.com/en/releasenotes/terminal/2257)
- [MetaTrader 5 build 3440: New trading account report](https://www.metatrader5.com/en/releasenotes/terminal/2251)
- [MetaTrader 5 build 3390: Float in OpenCL and in mathematical functions, Activation and Loss methods for machine learning](https://www.metatrader5.com/en/releasenotes/terminal/2247)
