What's new in MetaTrader 5

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

21 October 2021

MetaTrader 5 build 3090: Improvements and fixes


  1. Fixed an error which could cause custom trading symbols to disappear under certain conditions.
  2. Improved menu and toolbar icons.
  3. Three new languages have been added to MQL5.com: French, Italian and Turkish.

    Now the largest community of algorithmic traders MQL5.community is available in 11 languages. We have already localized the website interface, documentation and important forum topics. Articles and Economic Calendar in the new languages will also become available soon.

  4. Fixed errors reported in crash logs.


  1. Fixed bugs in the StringConcatenate function.
  2. Fixed setting of the _LastError value when working with the FileSave function. The variable could contain a null value instead of the description of the function error under certain conditions.
  3. Fixed data import from resources to double type arrays.


  1. Fixed an error which caused the chart window to freeze during visual testing.
Updated documentation

14 October 2021

MetaTrader 5 build 3081: Improvements in MQL5 services and design updates


  1. Improved navigation in MQL5.community services.

    Market, Signals and VPS sections have been moved from the main platform workspace to the Navigator. The new positioning provides easy access to the desired products and enables efficient management of purchases and subscriptions. "How it works" sections have been added to each service, to provide the basic usage information.

    Improved navigation through MQL5.community services

  2. All menu and toolbar icons have been completely redesigned. The terminal interface has become more user-friendly:

    • Removed small elements from icons
    • Reduced the number of used colors to avoid color noise
    • Fewer gradients are used to improve readability
    • More straightforward metaphors are used

    All menus, toolbars and dialogs have been redesigned in the platform

  3. Added the display of costs resulting from deal execution. The relevant information is shown in the trading history. This feature is used by NFA regulated brokers.

    The account history now shows deal costs>

    If your broker enables cost calculation on the server, the new Costs column will appear in your account trading history. The column shows the deal execution cost relative to the current mid-point price of the symbol (mid-point spread cost).

  4. Launched Korean version of MQL5.com.

    This is the eighth language available at MQL5.community, the largest community of algorithmic traders. The website interface, articles, the Economic Calendar and important forum topics are already available in Korean. MQL5 documentation will be translated soon.

  5. Fixed loading of custom trading instruments. In some cases, newly created symbol settings could overwrite existing symbol settings.
  6. Fixed the on-chart display of the signal trading history. Previously, the relevant option enabled the display of all trades for all financial instruments, and not only for the chart symbols.
  7. Added export of the Fee column to the trading history report. Previously the value was only displayed in the history, but it could not be saved to a file.
  8. Optimized and accelerated operation of one-click trading panels in Market Watch and on charts.
  9. Fixed operation of the Margin Ratios field for custom trading instruments. The values could be reset to zero under certain conditions.
  10. We continue implementing the Subscriptions service through which traders can purchase additional trading services from brokers. Fixed errors in the quotes subscription window.
  11. Fixed display of the Trend Line analytical object. Previously the line could disappear upon scaling or upon chart window resizing.
  12. Fixed display of the Rectangle analytical object. The object could disappear if one of the anchor points was beyond the chart visibility area.
  13. Fixes and operation speed improvements related to operation of built-in MQL5.community charts.
  14. Fixed rounding of the Value parameter in the list of open positions. The fractional part could be hidden in previous versions.
  15. Fixed mobile phone verification during the account opening process. Phone numbers could be identified as incorrect for some Chinese operators.
  16. Added support for MQL5 account passwords longer than 32 characters.
  17. Fixed export of certificates when working in Wine. This option is used for accounts with extended authentication, when migrating such accounts from desktop to mobile.
  18. Fixed buttons opening MQL5 services in the lower panel of the Toolbox window. The buttons were inactive when the window was undocked.
  19. Added limitation on the "File \ New Chart" menu size. Now the menu can contain no more than 128 submenus with symbol groups, each having no more than 32 symbols. The limitation speeds up the terminal operation and avoids freezing when adding a large number of trading symbols (2,000 or more) to Market Watch.


  1. We continue adding vector and matrix support. The new functions will significantly expand the possibilities for neural network-based solution developers.
  2. Added DEAL_SL and DEAL_TP values in the ENUM_DEAL_PROPERTY_DOUBLE enumeration — the Stop Loss and Take Profit levels of a deal.

    The relevant values for entry and reversal deals are set in accordance with the Stop Loss/Take Profit of orders, which initiated these deals. The Stop Loss/Take Profit values ​​of appropriate positions as of the time of position closure are used for exit deals.

  3. Added the MQL_HANDLES_USED value in the ENUM_MQL_INFO_INTEGER enumeration — the number of active class objects (handles) in an MQL program. These include both dynamic (created via new) and non-dynamic objects, global/local variables or class members. The more handles a program uses, the more resources it consumes.

  4. Added new methods for working with the MqlCalendarValue structure which describes an economic calendar event:

    • HasActualValue(void) — returns true if the actual value is set; otherwise returns false
    • HasForecastValue(void) — returns true if the forecast value is set; otherwise returns false
    • HasPreviousValue(void) — returns true if the previous value is set; otherwise returns false
    • HasRevisedValue(void) — returns true if the revised value is set; otherwise returns false
    • GetActualValue(void) — returns the actual value of an event (double) or nan if the relevant value is not set
    • GetForecastValue(void) — returns the forecast value of an event (double) or nan if the relevant value is not set
    • GetPreviousValue(void) — returns the previous value of an event (double) or nan if the relevant value is not set
    • GetRevisedValue(void) — returns the revised value of an event (double) or nan if the relevant value is not set

  5. Fixed debugging of the MQL5 programs which use libraries in the form of EX5 files.
  6. Accelerated compilation of programs containing large arrays initialized by a sequence.
  7. Fixed execution of the CopyTicksRange function with custom trading symbol data. The function could return data out of the requested period.
  8. Fixed verification of the availability of all template parameters during specialization by parameters. Code compilation with debug templates could cause "code generation error" under certain conditions.


  1. Added capability to automatically renew Signal subscriptions.

    Your subscription will not end abruptly, as the system will automatically renew it for another month through the payment method that you previously used for the initial subscription purchase.

    Enable auto renewal for your Signal subscription

    If you made your previous payment using a card and the renewal payment fails, the system will try to make a payment from your MQL5 account balance.

    Do not worry about changes in subscription prices. If the price grows, auto-renewal will be canceled. You will receive a relevant notification by email.

    You can enable or disable the auto renewal option at any moment via the My Subscriptions section at MQL5.com.

    Manage auto renewals from the My Subscriptions section at MQL5.com

  2. Fixed display of the Signals showcase. Now the system correctly identifies the compatibility of signals with the current account.


  1. Added product search by the author's name and login in the Market showcase. Previously, the service only supported search by product name and description.


  1. Improved the auto subscription renewal option.

    Previously, the payment for the renewal could only be made from the MQL5 account balance. The user had to make sure the relevant amount is available on their account.

    Now there is no need to top up the MQL5 account. The system will renew the subscription using the same payment method which you used for the initial subscription. If you paid for the VPS with a card and enabled the auto renewal option, the system will use the same payment method for the new subscription period. If the payment fails, the system will try to make a payment from your MQL5 account balance.

    Use cards and other payment methods for auto renewal

    With the new option, you can be sure that your Expert Advisors and signal subscriptions will not stop due to the end of the VPS period. Furthermore, there is no need to check and top up your balance manually.
    The option will only be used for new subscriptions. Payments for the renewal of existing subscriptions will be made from the MQL5 account balance.


  1. Fixed visual testing errors. Under certain conditions, charts could fail to display indicators used in Expert Advisors.


  1. Fixed jumping to the function or variable declaration using Alt+G. The action could fail if the declaration was below the call line.
  2. Added display of the object type for references to class objects in the debugger.
  3. Added capability to display union in the list of watched expressions.

MetaTrader 5 iPhone/iPad, MetaTrader 5 Android

  1. Added display of a disclaimer during application start. Please read it carefully. Additionally, some brokers can automatically create a demo account during the first start of the application. In this case, you will see the relevant terms.

    Disclaimers added in MetaTrader 5 for iPhone/iPad

  2. Added capability to connect an account to monitoring in the Signals service directly from the mobile application. This can be done by selecting "Account Monitoring" from the menu. For convenience, the account number and the broker name are automatically added to the registration window. You should additionally specify the signal name and an investor password.

    Connect your account to the monitoring to access advanced trading statistics, to share the results with other traders or to start selling your signals.

  3. Added support for Huawei AppGallery and HMS Services for mobile terminals running on Android OS. Huawei smartphone owners can install the app from the relevant store and use push notifications.
Updated documentation

18 June 2021

MetaTrader 5 build 2980: Push notifications for trade operations


  1. Added ability to receive push notifications from the server. You will be notified of executed trading operations even if your terminal is closed.

    In earlier versions, notifications on a mobile device could only be delivered from the trader's desktop terminal. Upon the execution of a trading operation, the terminal sent the relevant notification to MetaQuotes ID specified in settings. Notifications could only be sent from a running terminal. This requirement has been lifted. If a Take Profit triggers on the server while your computer is turned off, you will receive a notification about a closed position from the server.

    To start receiving notifications from the server, you should:

    • Have a real account as server notifications do not work for demo accounts
    • Install MetaTrader 5 for iOS or Android on your smartphone
    • Open the Messages section in the mobile terminal, find your MetaQuotes ID and specify it in the desktop terminal settings
    • Enable server notifications in desktop terminal settings

    The availability of server notifications should be provided by your broker

    Three notification types are supported: orders, deals and balance operations. When you enable the option, the available notification types will be displayed in the terminal log:
    '1222': subscribed to deals, orders, balance notifications from trade server

  2. Updated MetaTrader VPS Showcase. The VPS section has become more convenient:
    • The interface adapts to any screen width.
    • The showcase takes up less space vertically to fit in the workspace.
    • The necessary information appears only when it is needed. Payment details only appear after you select a payment plan.

    Terminal: In the Strategy Tester panel, added commands for quick switching to MQL5 services and to the Toolbox window. The commands are only displayed in the Overview section, while in other tabs the panel is used to manage testing.

  3. Added saving of window states for MQL5 services. If you leave the Market open before closing the terminal, the relevant window will be open the next time you launch the terminal.
  4. Fixed periodic synchronization of the MQL5 account state. Signal copying could fail under certain conditions due to an error.
  5. Fixed display of a selection of recommended Market products.
  6. Fixed signals context menu in the Navigator. You can use the menu to view the signal to which you are subscribed or to unsubscribe from a signal.


  1. Fixed "-" operator error in the implementation of complex numbers in the Standard Library (file MQL5\Include\Math\Alglib\complex.mqh).
  2. Now you can use any expressions in initialization sequences, not just constant ones. This improves usability and compatibility with C ++ code.
    struct POINT
       int x,y;
    int GetYFunc(y)
       return(y * y);
    void SomeFunction(int x1,int x2,int y)
       POINT pt={ x1+x2, GetYFunc(y) };
  3. Fixed an error which occurred during the compilation of union with huge data arrays.
  4. MQL5: Fixed operation of the StringToCharArray function. Now it converts the entire passed string to a Char array instead of stopping at the first terminating null character.
  5. Added control for the explicit presence of a constructor call for classes/structures if their parent class does not have a default constructor.


  1. Added display of a call place for inline functions in the profiler report.
    In the below example, the func(); call is now highlighted as follows:

    The func function itself is not highlighted since its full code is placed in OnStart.

  2. Added ability to create empty projects. This is a useful feature for non-standard development projects with specific file structures for which the default templates are not suitable.

    An empty settings file "mqproj" will be created in this case. Source code files should be created manually.

  3. Implemented faster launching of MetaEditor.
  4. Fixed data display in the list of observed expressions during debugging. The list could display incorrect variable values under certain conditions.
  5. Fixed automatic addition of ".py" extension to Python script files created using the MQL Wizard.
Updated documentation.

21 May 2021

MetaTrader 5 Build 2940: Positioning of MQL5 Services showcases in the workspace and updated design


  1. Trading services, including Market, Signals and Virtual Hosting are now conveniently displayed in the platform's main working area.

    In earlier versions, MQL5 Services purchasing areas were located in the small Toolbox window below the main window. The new placement enables the display of fully featured showcases with convenient purchasing options. The removal of unnecessary tabs from the lower area provides more space for other platform functions.

    Access to additional services does not interfere with the major functions, such as trading and chart analysis.

    • Service tabs are located at the end of the bar, after all chart tabs.
    • Unused service windows can be closed. To re-open them, use the Navigator, the toolbar or the "Services" menu.

    We have also completely redesigned the services. The design has become more elegant and lightweight. Signals feature additional data, which were previously available only via the MQL5.community website showcase: a polar diagram with the main characteristics, reliability and activity metrics and other variables.

  2. Added support for IPv6 addresses.

    IPv4 which is used in every network was created more than 30 years ago. It contains IP addresses of 32 bits, which are represented as four 8-bit numbers separated by dots. This algorithm produces more than four billion unique IP addresses. However, the rapidly growing number of users and devices has accelerated the depletion of the pool of available addresses.

    To avoid the depletion problem, some products feature additional support for the modern IPv6 standard. This protocol uses a 128-bit address, represented as x:x:x:x:x:x:x:x, where each x is a hexadecimal value of six 16-bit address elements. Theoretically, this format allows 5 x 10 ^ 28 unique addresses. In addition to an extensive address space, this protocol has other advantages over the older version. For further details please refer to specialized articles.

    The MetaTrader 5 platform is fully IPv6-ready. If your broker or provider switches to the new protocol, the protocol support will be seamlessly enabled in the platform, with no additional action required from your end.

  3. We continue implementing the Task Manager functionality presented in build 2815. We have added an explicit indication for charts, on which MQL program debugging or profiling is running.

  4. Implemented faster platform launching under Wine on macOS and Linux computers. General optimization and bug fixes:
    • Improved display of menus, toolbars and dialog boxes.
    • Fixed errors in displaying the "Market", "Signals" and "VPS" sections. In particular, we have fixed the loading of product logos on the "Market" showcase.
    • Updated DMG package for easy MetaTrader 5 installation on macOS computers. With this package, the platform can be installed similarly to any other application: drag the platform icon to Applications and wait for the installation to complete.
      The package includes additional components which enable a more stable and a faster operation. All package users are strongly advised to reinstall MetaTrader 5 by downloading the latest version from https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/MetaTrader5.dmg
    If you are using CrossOver, please completely reinstall MetaTrader 5 to obtain the latest 64-bit platform version.
  5. Fixed "Ctrl+F9" keyboard shortcut action. It activates the Trade tab in the Toolbox.


  1. We continue limiting the circulation of older technologies, including 32-bit components.
    • 32-bit terminals are no longer allowed to load programs from the Market.
    • 32-bit terminals cannot connect to the hosting service.
    • The 32-bit MetaEditor version does not support additional file protection via MQL5 Cloud Protector.
    • MQL5 programs compiled under old MetaEditor versions (released 5 years ago or more) cannot run in the new terminal version.

    Support for the 32-bit platform version was discontinued a year ago, after the release of build 2361. We strongly recommend upgrading to the 64-bit MetaTrader 5 version in order to access all the platform's features without any limitation.
    Furthermore, we recommend all Sellers, who have previously uploaded 32-bit product versions to the Market, to recompile them using the latest 64-bit MetaEditor and to upload the new versions. The ability to run 32-bit MQL5 programs in terminals will be completely disabled soon.

  2. Added support for operations with complex numbers.

    Added new built-in type "complex".
    struct complex
       double             real;   // Real part
       double             imag;   // Imaginary part
    The "complex" type can be passed by value as a parameter for MQL5 functions (in contrast to ordinary structures, which are only passed by reference). For functions imported from DLLs, the "complex" type must be passed only by reference.

    The 'i' suffix is used to describe complex constants:
    complex square(complex c)
    void OnStart()
       Print(square(1+2i));  // A constant is passed as a parameter
    // "(-3,4)" will be output, which is a string representation of the complex number 
    Only simple operations are currently available for complex numbers: =, +, -, *, /, +=, -=, *=, /=, ==,!=.

    Support for additional mathematical functions will be added later, enabling the calculation of the absolute value, sine, cosine and others.

  3. New error code TRADE_RETCODE_HEDGE_PROHIBITED — opening of a position or placing of a pending order is not allowed because hedge positions are prohibited. The error is returned if a user tries to execute a trading operation in case the hedging is disabled for the account and an opposite order or position already exists for the same symbol.


  1. Fixed debugging and profiling termination in non-visual mode.
  2. Fixed indicator profiling on real data. Such profiling could fail to start under certain conditions.


  1. Fixed environment migration to a VPS. An error could occur for Expert Advisors containing indicators as resources.


  1. Fixed trading mode checks for copied signals. Symbol trading can be limited on the broker side, i.e. the broker can set 'long only', 'short only' or 'close only' conditions. In earlier versions, synchronization required full trading conditions and thus copying was not allowed for all other cases. After the update, partially limited conditions will be considered as "trading". This ability will be especially useful for stock brokers' clients who wish to copy signals.


  1. Fixed trading session checks during testing. Trading operation execution could fail during testing under certain conditions, in which case the "market closed" error was returned even if the operation was initiated within a trading session.
Updated documentation.

2 April 2021

MetaTrader 5 build 2875: Improvements and fixes


  1. Fixed a bug which caused updated MQL5 standard programs to be copied to the terminal's root data directory instead of the MQL5 subdirectory. Due to this error, additional "Experts", "Images", "Include" and other folders could be created under the data directory.

    After the platform update, these folders will be checked and automatically deleted.

  2. Fixed an error which used to prevent users from logging into the built-in MQL5.community chat.


  1. Fixed optimization of Expert Advisors via the MQL5 Cloud Network. The optimization could fail to start under certain conditions.


  1. Fixed errors and crashes during MQL5 program debugging and profiling.

Updated documentation.

26 March 2021

MetaTrader 5 build 2860: Improvements for Wine and SQL integration enhancements


  1. Added ability to enable/disable additional MQL5.community services. For example, if you are not interested in MQL5 programming articles or copy trading features of the Signals service, you can disable the relevant section to optimize resources and terminal workspace.

    All services are enabled by default.

  2. We have significantly optimized terminal operation under Wine on macOS and Linux:
    • Now undocked service windows (Navigator, Toolbox) cannot be dragged beyond terminal borders. Previously, this could cause difficulty in dragging windows back to the terminal.
    • Fixed resizing of service window contents when resizing the window.
    • Fixed display of performance metrics in Task Manager.
    • Improved display of icons on the toolbar.
    • Fixed unread message counter in chats.
    • Fixed display of chart system commands: Hide, Expand and Close.
    • Fixed log display.
    • Fixed display of chart tooltips.
    • Fixed chart print commands.
    • Fixed display of the top menu when using Linux skins.
    • Fixed search in GitHub, MSDN and Stack Overflow in MetaEditor.
    We recommend all users to update Wine to the latest stable version. This will increase the platform performance and reliability.
  3. Added support for "Market To Limit" orders when trading on BORSA Istanbul. Such an order is initially executed as a market order. If liquidity is not enough, the remaining volume is added to the order book as a limit order with the last deal price.
  4. Fixed volatility chart display. Now, the chart is built in accordance with the expiry date selected on the options board.
  5. Fixed adding of trading instruments to the Market Depth via the quick search bar. If the symbol name has a space, this symbol will not be added to the list.


  1. Expanded possibilities for working with SQL databases. Queries now support a variety of statistical and mathematical functions.

    Statistical functions
    • mode
    • median (50th percentile)
    • percentile_25
    • percentile_75
    • percentile_90
    • percentile_95
    • percentile_99
    • stddev or stddev_samp — sample standard deviation
    • stddev_pop — population standard deviation
    • variance or var_samp — sample variance
    • var_pop — population variance

    Mathematical functions

      count(*) as book_count,
      cast(avg(parent) as integer) as mean,
      cast(median(parent) as integer) as median,
      mode(parent) as mode,
      percentile_90(parent) as p90,
      percentile_95(parent) as p95,
      percentile_99(parent) as p99
    from moz_bookmarks;
  2. Added new macros:

    • __COUNTER__ — increases by one on each call. Separate counters are provided when used in templates and macros.
    • __RANDOM__ — generates a random ulong number; it is an analogue of the MathRand function.

  3. Fixed operation of synchronous chart requests in cases when the chart symbol does not exist. Now, the functions return a relevant error instead of waiting indefinitely for a result. A situation with a non-existent symbol be caused by switching between trading accounts with different sets of trading instruments.
  4. Optimized and accelerated CopyTicks* functions.


  1. Changed order of profiling and debugging using historical data.

    Profiling now always runs in non-visual mode. Default debugging also runs in non-visual mode. The appropriate option can be enabled manually in MetaEditor settings:

  2. Added ability to profile services. The process is similar to other MQL5 programs.
  3. Fixed display of function names in the profiler report. Under certain conditions, the names could be specified as <unknown>.

Documentation has been updated.

26 February 2021

MetaTrader 5 build 2815: Access to the Depth of Market from Python, revamped Debugger, and Profiler improvements


  1. Added ability to access Depth of Market data via the Python API.
    Three new functions allow quick obtaining of data for statistical calculations and machine learning tasks, which can be implemented using a plethora of out-of-the-box Python libraries.
    • market_book_add — subscribes the MetaTrader 5 terminal to receive events related to changes in the Depth of Market for the specified symbol.
    • market_book_get — returns a tuple from BookInfo containing the Depth of Market records for the specified symbol.
    • market_book_release — cancels MetaTrader 5 terminal subscription to events related to changes in the Depth of Market for the specified symbol.

  2. The maximum length of Push messages has been increased from 256 to 1024 characters. Now, you can send more information from your MQL5 programs on mobile devices.
  3. Added a preliminary version of the Task Manager, which can be called by pressing the F2 key.
    The Task Manager enables monitoring of resources consumed by the platform. You can view the amount of memory consumed by charts, CPU resources used by Expert Advisors and other performance metrics. If your platform performance slows down, you can easily detect and fix the problem.

  4. Enhanced Subscriptions service. A special indication has been added for symbols having delayed quotes:
    • Symbols in Market Watch are marked with a clock icon, and the delay value is displayed in the tooltip
    • Data delay notification is displayed on charts

  5. Fixed display of the Subscriptions list when there is no trading account connection.
  6. Fixed links in emails and newsletters. All links now open in the default browser. Previously, links opened only in Internet Explorer.
  7. Fixed connections from the WebRequest function to hosts with IPv6 addresses and Cloudflare protection.
  8. Improved functionality and responsiveness of the VPS service.
  9. Improved operation under Wine and MacOS/Crossover, including the version for macOS Big Sur with the M1 processor.


  1. Fixed error in the ArrayPrint function. The function could occasionally fail to print arrays.
  2. Optimized file operations performed by File* functions. Now, file reading and writing operations run much faster.
  3. Removed the restriction requiring the specification of size for the second, third and fourth dimensions of a dynamic array, when the array is used as a function parameter. This increases code reuse and flexibility.
    void func(int &arr[ ][ ][ ][ ])
  4.  Fixed ArrayBsearch function operation. The function could return an incorrect index of the found element during a binary search.


  1. More new features have become available in the revamped debugger.
    • Arrays are now displayed in the observation window in accordance with the sorting set by ArraySetAsSeries.
    • Added support for local static variables.
    • Fixed display of the specified array element value.
    • Fixed handling of 'static' class fields.
    • Other improvements for more accurate and reliable debugging.

  2. Added option "Enable optimizations in profiling".
    Code optimization mode can be disabled in order to include more details in the profiling report. Code speed without optimization can be several times slower, but this mode provides a wider code coverage. Please note that with optimization code bottlenecks can be imprecise.
    A milder profiling mode can be set by disabling the "Enable inlining in profiling".

    The optimization management option has also been added to project settings.
    • If optimization is disabled in the project, then the new option is ignored, and thus optimization will always be disabled for profiling (including inlining operations).
    • If optimization is enabled in the project, then the new option will be taken into account during profiling compilation.

  3. Added logging for debugging and profiling processes. Environment settings are logged at operation start; collected data statistics is logged at operation stop.
    MQL5 profiler    starting 'ExpertMACD.ex5' on history with parameters:
    MQL5 profiler       symbol: 'EURUSD'
    MQL5 profiler       period: 'H1'
    MQL5 profiler       date from: '2021.01.01'
    MQL5 profiler       date to: '2021.02.22'
    MQL5 profiler       ticks mode: 'every tick'
    MQL5 profiler       execution delay: 0 ms
    MQL5 profiler       deposit: 10000
    MQL5 profiler       currency: 'USD'
    MQL5 profiler       leverage: 1:100
    MQL5 profiler       profit in pips: NO
    MQL5 profiler    profile data received (4640 bytes)
    MQL5 profiler    758 total measurements, 0/0 errors, 470 kb of stack memory analyzed
    MQL5 profiler    7782 total function frames found (1929 mql5 code, 342 built-in, 1403 other, 4108 system)


  1. Fixed specification of non-trading hours in advanced testing settings.

Updated documentation.

15 January 2021

MetaTrader 5 build 2755: Popup Prices window and Debugger improvements


  1.  Revised Popup Prices window which allows viewing financial symbol prices on any screen size.

    The window now supports multi-column presentation, enabling the efficient utilization of screen space. To switch the display mode, use the window properties dialog.

    Further improvements in this window are as follows:

    • Added column selection menu. The menu features the same symbol properties which are available in Market Watch.
    • Optimized operation with a large number of financial instruments. The window performance is now equally high for 10 and for 1000 instruments.
    • Added display of brief instrument information in a tooltip.
    • Fixed applying of color settings for displaying rising and falling prices.

  2. Added display of deals on the tick chart of the synthetic Market Depth.

    Synthetic Market Depth is used for the symbols, for which Level 2 prices are not provided. In this case, levels are built automatically, at distances equal to a price change step, starting from the best Bid and Ask prices. Now, if the last deal price and volume data is provided for a symbol, the relevant data is displayed on the tick chart. The information is displayed as circles:
    • Red circles show Sell transactions.
    • Blue circles show Buy transactions.
    • Green circles appear when the direction of the transaction is undefined.

    The larger the circle, the greater the volume of the transaction.

  3. Fixed calculation of Greeks in the options board. An error could occur if the option's underlying asset had a zero last deal price.
  4. We continue implementing the new "Subscriptions" service, which enables the provision of additional trading services. Recently, we have fixed the display of dependent subscriptions. Such subscriptions are used for bundled services.
  5. Improved platform operation under Wine.


  1. Added generation of ChartEvent events upon the release of the right and middle mouse buttons. This event can be utilized when creating graphical panels. To enable the events, disable the chart context menu via the CHART_CONTEXT_MENU property.
  2. Fixed a bug causing a significant error in the Sleep function waiting time.


  1. We have initiated the global update of the debugger. The window of observed expressions has been significantly improved. Now, it allows viewing the contents of arrays and objects as drop-down lists, as well as pointer values.

    To view an array or object, double-click on it in the observation window.

  2. Fixed freezing when opening some projects.

Documentation has been updated.

26 November 2020

MetaTrader 5 build 2715: General improvements


  1. Fixed platform freezing when using the options board. Freezing could be caused by a zero tick size specified in trading instrument settings.
  2. Fixed UI display errors on HiDPI displays.


  1. Fixed string to time conversion by the StringToTime function. An error could occur when specifying time as "yyyymmdd [hhmiss]".
  2. Fixed operation of implicit copy operator for objects containing dynamic arrays. Now, the operation reduces the destination object size to the copied object size.
    struct MyStruct
      string Array[];
    void OnStart()
      MyStruct a1,a2;
    Earlier, the "a1" array size was equal to 3 after the function call. Now, the size will be 1.


  1. Updated rating calculation algorithm for MQL5 Cloud Network testing agents. The rating is now determined more accurately and is changed less frequently.

Documentation has been updated.

12 November 2020

MetaTrader 5 Build 2690: MetaEditor improvements


  1. Fixed display of the synthetic Market Depth feature. Previously, this feature could be unavailable for some symbols.

    Synthetic Market Depth is used for the symbols, for which Level 2 prices are not provided. In this case, levels are built automatically, at distances equal to a price change step, starting from the best Bid and Ask prices. This is a convenient tool for placing, modifying and deleting orders, quickly and with maximum clarity.


  1. Optimized and greatly accelerated access to Last prices from MQL5 programs, using the SymbolInfoTick function.
  2. Fixed resetting of Ichimoku Kinko Hyo indicator parameters from a dialog box.

  3. Fixed freezing of Copy* functions when history is not available for a trading instrument.
  4. More improvements within the total update of the code profiler. The following improvements have been implemented, in addition to the innovations presented in build 2650:
    • Improved data presentation
    • Shorter column names are now used in the report
    • Ability to save profiling reports to a file
    • Added display of a tooltip with a row number for functions in the report.


  1. Added ability to disable clipboard tracking and to clear clipboard history.

    The clipboard tracking function improves the source code usability by providing quick access to recently used data. Press Alt+V in any source code position, select any of the earlier copied lines from the menu, and the line will be inserted in the selected position.
    Use the appropriate toolbar command or editor settings to enable/disable tracking.

  2. Fixed calculation of some observed expressions during program debugging.


  1. Trading is now prohibited for Expert Advisors running in the Strategy Tester in the frame receiving mode.
  2. Fixed importing of optimization results in the Strategy Tester. An error could cause timeframe values to be imported incorrectly.

Documentation has been updated.

9 October 2020

MetaTrader 5 build 2650: Background chart loading and MQL5 code profiler improvements


  1. The Options tab features a new setting entitled "Preload chart data for open positions and orders".

    In order to save traffic, the trading platform downloads symbol price history only when the relevant data is requested, for example when the price chart is opened or when testing is launched. However, this may not always be convenient for actively used symbols. If you enable the new option, the charts of the symbols for which you have open positions or pending orders, will be updated in the background mode whenever you launch the platform. Thus, you will not have to wait for data download after chart opening, and the relevant data will be immediately available for analysis.

  2. Fixed generation of daily bars after weekends.
  3. Fixed chart updating. Charts could occasionally fail to update after the additional download of updated price data.
  4. Optimized updating of the account trading history cache. The optimization enables the reduction of data delays when using History* functions.
  5. Fixed display of the Comment column when displaying trading history as positions.
  6. Fixed display of the Signal subscription renewal button.


  1. More improvements within the total update of the code profiler. The following functions have been implemented in addition to the innovations presented in build 2615:

    Added new parameters
    We have previously announced the usage of the Sampling method for the new profiler. The profiler makes pauses in the MQL program operation (~1000 times per second) and collects statistics on how many pauses were performed in certain code segments. This also includes the analysis of call stacks to determine the share of each function in the total code operation time. After profiling, users receive statistics on how many times the operation was paused and how many times each of the functions appeared in the call stack:

    • Total CPU [unit,%] — how many times the function appeared in the call stack.
    • Self CPU [unit,%] — the number of "pauses" which occurred directly within the specified function. This variable is crucial in identifying bottlenecks: according to statistics, pauses occur more often where more processor time is required.

    Added ability to disable function inlining during profiling
    During the compilation of MQL programs, functions are inlined, i.e. the function code is added directly to the function call site. This enables significant performance acceleration. However, this procedure makes the profiling of functions difficult. On order to obtain a report on "pure" functions, you can disable inlining in the MetaEditor settings:

    Updated report design
    We have redesigned the profiling report and the presentation of profiling information in the source code window. The modernized design will be more familiar to Visual Studio users.

  2. Fixed CopyTicksRange function operation. The function could sometimes return incomplete data.
  3. New error code TRADE_RETCODE_HEDGE_PROHIBITED — opening of a position or placing of a pending order is not allowed because hedge positions are prohibited. The error is returned if a user tries to execute a trading operation in the case the hedging is disabled for the account and the user already has an opposite order or position for the same symbol.
  4. Removed the ability to call MessageBox when debugging indicators. MessageBox cannot be called from indicators because it suspends the thread execution for the whole time while waiting for the user's response.
  5. Optimized and significantly accelerated addition of trading instruments to the Market Watch using the SymbolSelect function.
  6. Fixed ArrayInsert function behavior for fixed-sized arrays. Now, the behavior corresponds to its description in the documentation: when elements are inserted, the size of the destination array does not change and the elements to the right of the insert position are shifted to the right (the last 'count' elements are "dropped off"), while the elements are copied from the source to the released space.


  1. Fixed working with custom trading condition settings during testing; the settings dialog has been revised.

    • Fixed calculation of custom commissions. To enable commissions, it is now enough to specify the symbol name rather than the entire path.
    • Rearranged tabs for more efficient operation.
    • Renamed the dialog and the option enabling custom settings.
    • Optimized column width in the settings tables.
    • When the "Use custom settings" option is disabled, all other settings in the dialog are deactivated. Previously, the settings remained editable, and users might mistakenly think the settings would be applied during testing.

  2. Fixed an occasional error related to the receiving of orders from the trade history by ticket.


  1. Added color scheme presets for the code editing window: light (default), dark and blue. You can customize the editor without having to configure the editor view manually.

    Additionally, it is now possible to customize the border color for the function tooltips.

  2. MetaEditor: All icons in the toolbars have been updated to support HiDPI monitors.

Documentation has been updated.

17 September 2020

MetaTrader 5 build 2615: Fundamental analysis and complex criteria in the Strategy Tester


  1. Expanded fundamental analysis facilities.
    Added new trading instrument properties, which enable a more accurate categorization of symbols:
    • Sector — the sector of the economy which the asset belongs to, such as energy, finance, healthcare and others.
    • Industry — the industry type which the asset belongs to, such as sportswear, accessories, car manufacturing, restaurant business and others.
    • Country — the country of the company whose shares are traded on the stock exchange.
    Based on these properties, a separate system has been implemented in Market Watch, enabling efficient operations with symbols. Select a category from the menu, and all available instruments will be added to a list for in-depth analysis:

    Relevant properties have been added to contract specifications:

    Furthermore, fundamental data on trading symbols can now be opened directly from the platform. Links to the largest aggregators have been added to the Market Watch context menu:

    The availability of extended data is controlled by the broker. However, we have ensured the default availability of the advanced information for the maximum number of instruments. As soon as brokers update their servers to the new version, the appropriate country, sector and industry data will appear in your platforms.
  2. Improved Signals and Market showcases. Rental and subscription buttons have been added to the left-side panel:

    Further improvements concern the section design. This includes brighter button colors, larger MQL5 login buttons and other improvements.

  3. Fixed potential profit/loss calculation for Stop Loss and Take Profit chart levels.

  4. Fixed errors in the calculation of synthetic instruments. The errors could occasionally cause the platform to freeze at startup.
  5. Fixed display of built-in Fractals indicator values in the Data Window.
  6. All icons in the platform toolbars have been updated to support HiDPI monitors.
  7. Fixed position volume adjustment for copied trading signals. The adjustment operation could sometimes fail due to incorrectly applied stop levels, which caused the "invalid stops" error.
  8. Optimized price history rebuilding after relevant changes on the server.
  9. Fixed display of trade level tooltips on charts. In some cases, tooltips were shown on charts even if the display of trade levels was disabled.
  10. Fixed option "Show on Charts \ Auto Update" in the context menu of orders an d positions under the "Toolbox\ Trade" section. Now, if this option is unchecked, trading history display will be disabled for all open charts.


  1. Added MathClassify function. It determines the type of a real number and returns a result as a value from the new ENUM_FP_CLASS enumeration.
    ENUM_FP_CLASS  MathClassify(
       double  value      // real number
    The enumeration contains the following values:
    • FP_SUBNORMAL — a subnormal number which is closer to zero than the smallest representable normal number DBL_MIN — 2.2250738585072014e-308.
    • FP_NORMAL — a normal number in the range between 2.2250738585072014e-308 and 1.7976931348623158e+308.
    • FP_ZERO — a positive or a negative zero.
    • FP_INFINITE — a number which cannot be represented by the appropriate type, positive or negative infinity.
    • FP_NAN is not a number.

    Use the following code to check the real number validity:
       Print("value is not a valid number");
  2. Added symbol properties which can be obtained using SymbolInfoString functions:
    • SYMBOL_COUNTRY — the country of the company whose shares are traded on the stock exchange.
    • SYMBOL_SECTOR_NAME — the sector of the economy which the asset belongs to, such as energy, finance, healthcare and others.
    • SYMBOL_INDUSTRY_NAME — the industry which the asset belongs to, such as sportswear, accessories, car manufacturing, restaurant business and others.

    The properties are returned as a string.

    The sector and the industry which the instrument belongs to can be obtained as an enumeration value. This can be done by requesting the following properties using the SymbolInfoInteger function:
    The ENUM_SYMBOL_SECTOR and ENUM_SYMBOL_INDUSTRY enumerations have been added for working with these properties.

  3. A new memory management mechanism has been implemented in MQL5 programs. It enables up to 3 times faster memory allocation and avoids potential memory access errors.
  4. Optimized and accelerated operations with the account tick history via History* functions.
  5. Fixed WebRequest call from the OnDeinit entry point. In earlier versions, the function call could not be implemented in the case of an Expert Advisor stop.
  6. Fixed WebRequest function calls from services. Previously, a function call could fail after service restart.
  7. Added check for double type support on a device when using OpenCL. The float type cannot be used in financial calculations due to excessive rounding. Therefore, the platform explicitly requires double-support for calculations. If the double type is not supported, an appropriate message will be written to the platform log: device '<name>' does not support type 'double'. Previously, a common error message was shown in such cases.
  8. Fixed application of templates to a chart through the ChartApplyTemplate function.
  9. Fixed ChartSetInteger function call with the CHART_BRING_TO_TOP parameter.
  10. A new Conjugate method has been added to the built-in Alglib library. This method enables conjugate number calculation for complex numbers. The library is located at MQL5\Include\Math\Alglib.
  11. Completely revised code profiler. The new profiler operates with a higher accuracy and at a higher speed.
    • The analysis is now based on the code which is optimized similarly to the compilation of a program's release version. This enables a more accurate determination of code execution speed, as exactly the same code will be used during program execution.
    • The new profiler uses the "Sampling" profiling method. This lightweight and accurate method collects application performance statistics by collecting call stack data and by calculating performance at regular intervals.
    • Unlike the previous versions, the new profiler does not make any changes to the analyzed code. The previously used Instrumentation method added certain constructs to the code, which were used to measure the function speed. This could affect the final code speed.

    The development of the profiler will continue. Further improvements will become available in upcoming platform releases.


  1. Optimized operations with MQL5 Cloud Network. Fixed loading of Expert Advisors on agents.
  2. Added new optimization criterion "Complex Criterion max". This is an integral and complex measure of a test pass quality. It measures multiple parameters:
    • Number of Deals
    • Drawdown
    • Recovery Factor
    • Expected Payoff
    • Sharpe Ratio

    The highest value of one parameter (for example the profit) is not always the best option in terms of the complex analysis. The complex criterion gradually selects the best passes: firstly, by the number of deals, then by the Expected Payoff, Recovery Factor, and so on. The new option allows reception of the best optimization passes according to all parameters. Furthermore, you can select the optimal pass based on the desired parameter, such as the highest profit.

    Select the new criterion in the strategy tester settings and start optimization.

    The "Complex Criterion max" value will be displayed in a separate "Result" tab in optimization results. Passes can be sorted by this column. The new criterion supports color-coded lighting to visually highlight the best passes. Values below 20 are highlighted in red, and values above 80 are shown in dark green.

  3. Fixed calculation of custom commissions in the Strategy Tester.


  1. We have initiated the global revision of smart code management functions (IntelliSense).
    • Hints now show the full function signature in addition to its name.
    • The font for the hints is now set in accordance with MetaEditor settings.
    Further improvements will become available in upcoming platform releases.
Updated documentation.

24 July 2020

MetaTrader 5 build 2560: Built-in learning system improvements


  1. In the previous platform update, we have presented a completely revised learning system. Further improvements have been implemented in the latest version:
    • The progress bar icon has become more visible
    • The text of some hints has been revised
    • Learning progress calculation has been fixed
    Complete all lessons to start using the platform capabilities to the maximum.

  2. Optimized and significantly accelerated processing of large tick streams (with more than tens of thousands of ticks per minute).
  3. Fixed errors in the calculation of price changes relative to the previous session close price. To view this variable, enable the "Daily Change" column in the Market Watch context menu.


  1. Optimized and accelerated access to numerical chart properties via the ChartGetInteger function.
  2. Fixed custom indicator search, when such an indicator is requested from an MQL5 program via the iCustom function.


  1. Added compilation of C/C++ programs in projects.


  1. Significantly optimized work of the MQL5 Cloud Network. Now, the Network can distribute tasks and return calculation results faster due to the improved agent search efficiency.

Updated documentation.

10 July 2020

MetaTrader 5 build 2530: Sorting in Market Watch and advanced operations with optimization results


  1. A sorting option has been added to the Market Watch window:

    • Click on a column name to sort the list by required data, such as the symbol name, close price, daily change or other variables.
    • Use the new menu with the most popular sorting options. Sorting by the highest growth and fall based on a daily symbol price change can be useful when trading exchange instruments.

  2. Redesigned and improved built-in learning system.
    All interactive hints are grouped into various categories for easier navigation. The number of completed and remaining hints is shown for each category.

    Every hint is now provided with a checklist, indicating the key action which the user should execute in order to complete training.
    We have also revised the learning system design and fixed errors in the total progress calculation.

  3. Added automated calculation of a symbol's previous session close time and of its current session open time. If the appropriate data is not provided by the broker directly, the terminal will calculate the values based on the first and the last quotes in a session. The relevant information can be displayed in the Market Watch window: enable appropriate columns in the "Symbols" section or navigate to the "Details" section.

  4. Optimized and accelerated application of prices to open positions. When new ticks arrive in the terminal, prices, profit and margin requirements are updated faster.
  5. Fixed calculation of the built-in Stochastic Oscillator. An error could occur in the case where a limited number of bars was displayed on charts.


  1. Optimized and accelerated AccountInfo* function which provides access to trading account properties.
  2. Optimized and accelerated access to numerical chart properties via the ChartGetInteger function.


  1. The following context menu commands have been added to the code editing tabs for efficient operations with the MQL5 Storage:

    • Compare a working copy of a file with the current revision
    • Revert changes
    • View file change history

  2. Changed the highlighting of matching brackets. Now, highlighting is applied to brackets instead of the background. The highlighting is disabled by default. It can be enabled in editor settings.

  3. Improved search and replace functions:

    • If you select a text in the file and bring up the search box, the text will be automatically substituted in the "Find" field. If no text is selected, a text from the clipboard will be pasted in the "Find" field. If the clipboard is empty, the focus in the search box will be set to the "Find" field.
    • A similar behavior is implemented for the replace window: the selected text is inserted in the search field, and the cursor is moved to the "Replace with" field. Thus, you can immediately enter the required new text.
    • Search and replace results are now displayed in the log instead of the previously used separate dialog box. If the Toolbox window is enabled, the Journal tab will be automatically selected in it. Thus, you do not need to work with extra windows.

  4. Fixed search in the file comparison window when working with the MQL5 Storage.
  5. Added possibility to search and replace data in files connected to the current file via the #include directive.

    The new option enables faster operations with projects consisting of multiple files. For example, to replace a text in all files, you will not need to specify their directories manually. The editor can automatically find them through the #include directives.


  1. We have revised optimization criteria which include two variables, one of which is the balance. Now, the criteria only take into account the second variable and ignore the balance. The new optimization criteria are easier to analyze.

    • Balance + Maximum Profitability -> Maximum Profitability
    • Balance + Maximum Expected Payoff -> Maximum Expected Payoff
    • Balance + Minimum Drawdown -> Minimum Drawdown
    • Balance + Maximum Recovery Factor -> Maximum Recovery Factor
    • Balance + Maximum Sharpe Ratio -> Maximum Sharpe Ratio

  2. New quick commands in the "Optimization parameters" submenu, allow showing or hiding, of all input columns in the table with optimization results:

  3. Added coloring for the optimization results table and graph, for a more convenient visual analysis.
    The graph is colored with a green-to-red gradient, depending on the value of the optimization criterion. The following colors are used for the table:

    • Balance: values above the initial deposit are colored in blue, and those below the initial deposit are shown in red.
    • Profit: blue is used for values greater than zero, and red is used for values less than zero.
    • Expected Payoff: blue is used for values greater than zero, and red is used for values less than zero.
    • Drawdown: from green (0-5%) to red (greater than 30%).
    • Sharpe Ratio: from green (greater than 2) to red (less than 0).
    • Recovery Factor: from green (greater than 2) to red (less than 1).

  4. Filters have been added in the optimization results table. Use the filters to hide unsuccessful passes from the list:

    • Passes without trades
    • Loss-making passes
    • Passes with the drawdown greater than 50%
    • Passes with the Recovery Factor less than 1
    • Passes with the Sharpe Ratio less than 0.5

  5. Optimized work of the MQL5 Cloud Network. Now, when an optimization is launched for the same Expert Advisor, the network tries to use the same testing agents which were used during the previous optimization pass. This is because the required market environment, including the trading history, is already available for such agents.
Updated documentation.

26 June 2020

MetaTrader 5 iOS build 2505: Swipes, new sections and color schemes

MetaTrader 5 iOS build 2505

We have gathered feedback from MetaTrader 5 iOS users and redesigned the application considerably

  • Added search for symbols in the quotes section.
  • Added the default "color on white" color scheme for charts.
  • Added display of deals on charts.
  • Moved the timeframe switch panel upwards so that it no longer overlaps the chart.
  • Added vertical scaling of charts — simply swipe over the price scale.
  • Added the ability to move accounts to other devices using QR codes.
  • Added display of the daily price change in pips in the quotes section. The data is available only if it is provided by a broker.
  • Added support for swipes to Quotes, History and Trade screens.
  • Added adaptive selection of a trading volume for fast trading.
  • Added the ability to access the OTP generator via FaceID or fingerprint.
iPad navigation has been redesigned
  • Moved the one-click trading panel upwards;
  • Added the bottom menu with sections and indicators;
  • Moved email, news and account management sections to separate tabs;
  • Improved account management.

5 June 2020

MetaTrader 5 build 2485: iCustom improvements and overall optimization in MQL5


  1. Optimized and significantly accelerated bar history editing for custom financial instruments. The improvement also concerns the CustomRatesUpdate function.
  2. Fixed exporting of custom symbol settings to a JSON file.
  3. Fixed errors reported in crash logs.


  1. This version features a revised custom indicator loading algorithm via iCustom.

    If the backslash '\' is indicated before the custom indicator name, the EX5 indicator file is searched relative to the MQL5 root folder. So, for a call of iCustom(Symbol(), Period(), "\FirstIndicator"...), the indicator will be loaded as MQL5\FirstIndicator.ex5. If the file is not found at this path, error 4802 (ERR_INDICATOR_CANNOT_CREATE) is returned.

    If the path does not start with a backslash '\', the indicator is searched and loaded based on the following sequence of actions:

    • The EX5 file is searched in the same folder, where the caller program's EX5 is located. For example, the CrossMA.EX5 Expert Advisor is located at MQL5\Experts\MyExperts. It contains the following call: iCustom(Symbol(), Period(), "SecondIndicator"...). In this case, the indicator is searched at MQL5\Experts\MyExperts\SecondIndicator.ex5.
    • If the indicator is not found, a search relative to the Indicators root directory is performed: MQL5\Indicators. Thus, file MQL5\Indicators\SecondIndicator.ex5 is searched. If the indicator is not found, the function returns INVALID_HANDLE and error 4802 (ERR_INDICATOR_CANNOT_CREATE) is raised.

    If the indicator path is set in a subdirectory such as MyIndicators\ThirdIndicator, the search starts in the folder of the calling program (the Expert Advisor is located in the folder MQL5\Experts\MyExperts) at the following path: MQL5\Experts\MyExperts\MyIndicators\ThirdIndicator.ex5. In case of failure, file MQL5\Indicators\MyIndicators\ThirdIndicator.ex5 is searched. Please note that the path separator should be specified as a double backslash '\\'. For example: iCustom(Symbol(), Period(), "MyIndicators\\ThirdIndicator"...)

    Also, if a custom indicator call via iCustom is found in the program code, the compiler will implicitly add the "#property tester_indicator XXX" directive if it is not specified.

  2. Optimized and significantly accelerated HistorySelect function, which allows requesting the history of deals and orders.
  3. Fixed an occasional error in tick requesting via the CopyTicksRange function. The error caused the range beginning to be set to the day beginning rather than to the specified time.
  4. Optimized and significantly accelerated display of alerts via the Alert function.
  5. New property SYMBOL_TIME_MSC for the symbol's last tick time in milliseconds. The property can be obtained using the SymbolInfoInteger function.

29 May 2020

MetaTrader 5 Platform build 2470


  • Fixed a bug which caused the inability to add financial symbols with '-', '=', '_' and '+' in their names into Market Watch.



  • Fixed expanded search by the '\n' and '\r' end-of-line characters.
Updated documentation.

22 May 2020

MetaTrader 5 Platform Build 2450: "Subscriptions" service, UI improvements and revised features in MetaEditor


  1. We have released the all-new Subscriptions service. Subscriptions offer additional services which can assist you in trading. For example, you can subscribe to high-quality market data from well-known providers, analyze received data and develop new trading strategies. Optionally, you can request personal manager services to help you in learning trading basics or in mastering your platform usage skills.

    The service is currently under development and will become available for use in the next versions.

    How it works
    A new Subscriptions section has been added in the Navigator. All available services are displayed under this section. The list of services is configured on the broker side and thus it depends on the server to which you are connected. Subscriptions are divided into categories for easy browsing.

    Select a service to view its detailed description. Next, click Subscribe. All your active subscriptions are displayed under a separate section.

    When you subscribe to market data, appropriate trading instruments become available for selection in Market Watch. They can be used as regular symbols: view quotes in Market Watch, open charts and analyze them using objects and indicators, as well as run Expert Advisors in the strategy tester. Trading operations for these symbols are not supported.

    How to pay for subscriptions
    You can pay for the services using your trading account funds. There is no need to visit other websites, as the payment can be performed directly from the platform.

    Soon, we will add the possibility to purchase market data subscriptions by connecting to MetaQuotes-Demo
    We plan to set up subscriptions to market data from various exchanges around the world. In just a few clicks, you will be able to receive real-time quotes from Nasdaq, CME, NYSE, BOVESPA and other exchanges. You will be able to pay for subscriptions using an MQL5.community account, similarly to Market, Signals and Hosting purchases.

  2. Added new "Show ticker" option in chart settings. The option shows/hides the line containing the trading symbol name, the timeframe and a custom comment.

  3. Added option "Show trading history" in terminal settings and in chart settings. The ability to display market entries and exits on charts was available in previous versions but it was managed from the "Toolbox \ History" section. The new option enables a more comfortable setting of history display. You can configure it for all charts at a time or set separately for desired charts.

    Furthermore, you can quickly enable the display of trading history and trading levels using the chart context menu:

  4. Added new "Color on White" scheme in chart settings.

  5. New commands have been added to position and order context menus, enabling quick opening of the relevant symbol's Market Depth and chart:

  6. Added chart frame highlighting. This will help you to find the desired symbol chart when multiple charts are open in the terminal. Select a symbol in the Market Watch, an order or position line in the trading or history section, or an alert, and the frame of the appropriate symbol chart will blink three times.

  7. Improved display of trading levels on the chart.
    • Tickets are no longer displayed for positions, orders and levels, in order to keep the chart clean
    • Captions appear in uppercase for better readability
    • Volumes are displayed without the fractional part if it is zero
    • Levels are hidden if the chart height is less than 80 pixels

  8. Added display of symbol description (if it is available) in the upper left chart corner, in addition to symbol name.

  9. New columns have been added in the list of open orders and positions:
    • Change — operation profitability percentage
    • Value — the market value of the position
    • Magic — the identifier of orders and positions opened by the Expert Advisor (magic number)

    The new columns can be shown/hidden using the context menu.

    Position value and magic columns have also been added to the trading history section.

    Furthermore, the profit field in the open positions and history sections is highlighted depending on the operation result.

  10. Added support for negative prices. This enables proper platform operation in situations similar to the recent drop of oil prices below zero. This includes:
    • Display of quotes in Market Watch
    • Display of charts and Market Depth
    • Execution of trading operations
    • Calculation of profits and collateral

  11. The maximum number of symbols which can be simultaneously enabled in Market Watch has been increased to 5000.
  12. Fixed sorting in chats by the last update date.
  13. Optimized and accelerated operation with a large number of trading symbols (50,000 and more).
  14. Fixed a bug due to which it was impossible to close a position if its current volume did not correspond to the symbol's volume change step.


  1. Optimized and accelerated operations with the tick history.
  2. Added new functions for working with databases:
    • DatabaseReset — resets the request to the initial state, similar to DatabasePrepare call. The function is intended for multiple execution of a request with different parameter values. For example, when adding data to the table in bulk using the INSERT command, a custom set of field values should be formed for each entry.
    • DatabaseBind — sets a parameter value in a request. The function is used in case an SQL request contains "?" or "?N" parameterizable values where N means the parameter index (starting from one).
    • DatabaseBindArray — sets an array as a parameter value.

  3. Added FSD_FILE_MUST_EXIST flag for the FileSelectDialog function. It indicates that the selected files must exist.
  4. Values for describing options have been added to the ENUM_SYMBOL_INFO_DOUBLE enumeration:
    • SYMBOL_PRICE_CHANGE — change of the current price relative to the end of the previous trading day in %.
    • SYMBOL_PRICE_VOLATILITY — price volatility in %.
    • SYMBOL_PRICE_THEORETICAL — theoretical option price.
    • SYMBOL_PRICE_DELTA — option/warrant delta. Shows the value the option price changes by, when the underlying asset price changes by 1.
    • SYMBOL_PRICE_THETA — option/warrant theta. Number of points the option price is to lose every day due to a temporary breakup, i.e. when the expiration date approaches.
    • SYMBOL_PRICE_GAMMA — option/warrant gamma. Shows the change rate of delta — how quickly or slowly the option premium changes.
    • SYMBOL_PRICE_VEGA — option/warrant vega. Shows the number of points the option price changes by when the volatility changes by 1%.
    • SYMBOL_PRICE_RHO — option/warrant rho. Reflects the sensitivity of the theoretical option price to the interest rate changing by 1%.
    • SYMBOL_PRICE_OMEGA — option/warrant omega. Option elasticity — a relative percentage change of the option price by the percentage change of the underlying asset price.
    • SYMBOL_PRICE_SENSITIVITY — option/warrant sensitivity. Shows by how many points the price of the option's underlying asset should change so that the price of the option changes by one point.

  5. Added export of BLOB fields in HEX format in the DatabaseExport function.
  6. New CHART_SHOW_TICKER property has been added to ENUM_CHART_PROPERTY_INTEGER — showing a symbol ticker in the upper left corner. If CHART_SHOW_TICKER is set to false, CHART_SHOW_OHLC is also set to false and thus OHLC is hidden.   
  7. The quality of code generated by the compiler has been improved. This enabled the increase of its execution speed.
  8. Fixed errors related to the compilation and execution of template functions and classes. These are:
    • Priority mismatch error for overloaded template function calls
    • Template method/class generation error
    • Error caused by an attempt to access an internal class for a template parameter of a template function
    • Template class code generation error caused by the use of an internal class.
    • Error using the B<int> template object before B<void*>
    • Errors in the creation of complex objects having the internal type C and wrapped multiple times
    • Error transferring function pointer argument as const ref template
    • Error passing internal struct to a template function
    • Priority mismatch error for the execution of template functions
    • Incorrect parenthesis count in for and do-while loops
    • Incorrect parenthesis count in class structure description
    • Slowdown when adding one element at a time using ArrayResize
    • Error choosing a matching overloaded function

  9. Fixed occasional errors in the CustomTicksReplace function.
  10. Fixed selection of the display period for the history of trade orders. Now, the range is based on the order execution date instead of the previously used creation date.


  1. The path parameter has been added to the initialize method — path to metatrader.exe or metatrader64.exe. If the path is not specified, the module attempts to find the executable file on its own.
  2. The following new methods have been added:
    • symbols_get — receives all financial symbols from the MetaTrader 5 terminal.
    • symbols_total — obtains the number of all financial symbols in the MetaTrader 5 terminal.

  3. Added filtering by symbol groups for the following functions: orders_get, positions_get, history_orders_get and history_deals_get. Use call forms with the "group" parameter.
  4. The return value of order_send and order_check is now passed with the 'request' field containing the full description of the original request. For example:
    comment=Request executed
    request=TradeRequest(action=1, magic=234000, order=0, symbol='USDJPY', volume=0.1, price=108.018, stoplimit=0.0, ...
        traderequest: action=1
        traderequest: magic=234000
        traderequest: order=0
        traderequest: symbol=USDJPY
        traderequest: volume=0.1
        traderequest: price=108.018
        traderequest: stoplimit=0.0
  5. When launched on a chart, Python scripts now receive the chart symbol and period (in minutes) as arguments.
    import sys
    if len(sys.argv) == 3:
        chart_symbol, chart_tf = sys.argv[1:3];
    print("Hello world from", chart_symbol, chart_tf)
    >> Hello world from T.NYSE 15


  1. Added command "Add an existing folder". It enables a batch addition of all supported files from the selected directory into the project.

  2. Expanded search and replace options.

    Added extended search features with partial regular expression support. Use \r, \n, \t to specify line feed and tab characters in search requests. Search and replace dialogs have been combined into a single multi-tab dialog.

    Added a separate tab for searching in programmer communities. These include MQL5.community, as well as GitHub, MSDN and Stack Overflow.

    Search results from external resources appear in the MetaEditor toolbox window:

    Furthermore, you can immediately download source files from GitHub. Files are downloaded into a separate subdirectory of the Projects folder, named in accordance with the GitHub project name.

    Search results can be additionally sorted by date.

  3. Added possibility to quickly change font size in the code editing window. To change the font size, press Ctrl and scroll the mouse wheel.
  4. Added possibility to import tables from CSV files to database tables. The following parameters can be set during import:
    • Table name in the database
    • Automatic or manual file encoding detection
    • Data separator type
    • Skipping of the specified number of lines at the beginning
    • Comment prefix
    • If the file has column names
    • How line breaks will be determined
    • Whether data should be added to a new table or to an existing one
    • What quotes to use for strings

  5. Added quick commands for inserting time and color into the program source code. Select the desired values from the interactive calendar and the palette, and the editor will insert them in the appropriate format.

  6. MQL4 support has been disabled, since only 64-bit code is generated now.
  7. Fixed Class snippet operation.
  8. Fixed support for absolute paths in projects.
Updated documentation.

6 March 2020

MetaTrader 5 build 2360: Extension of SQLite integration
  1. MQL5: SQLite database operation errors can now be analyzed using standard MQL5 tools. The following error codes have been added:

    • ERR_DATABASE_ERROR — generic error.
    • ERR_DATABASE_INTERNAL — SQLite internal logic error.
    • ERR_DATABASE_PERM — access denied.
    • ERR_DATABASE_BUSY — database file locked.
    • ERR_DATABASE_LOCKED — database table locked.
    • ERR_DATABASE_NOMEM — insufficient memory for completing operation.
    • ERR_DATABASE_READONLY — attempt to write to read-only database.
    • ERR_DATABASE_IOERR — disk I/O error.
    • ERR_DATABASE_CORRUPT — database disk image corrupted.
    • ERR_DATABASE_FULL — insertion failed because database is full.
    • ERR_DATABASE_CANTOPEN — unable to open the database file.
    • ERR_DATABASE_PROTOCOL — database lock protocol error.
    • ERR_DATABASE_SCHEMA — internal use only.
    • ERR_DATABASE_TOOBIG — string or BLOB exceeds size limit.
    • ERR_DATABASE_CONSTRAINT — abort due to constraint violation.
    • ERR_DATABASE_MISMATCH — data type mismatch.
    • ERR_DATABASE_MISUSE — library used incorrectly.
    • ERR_DATABASE_AUTH — authorization denied.
    • ERR_DATABASE_RANGE — bind parameter error, incorrect index.
    • ERR_DATABASE_NOTADB — file opened that is not database file.

  2. MQL5: Fixed operation of the DatabaseImport function which enables data import from a file into a database table.
  3. MetaEditor: Fixed output of strings longer than 32KB to logs.
  4. MetaEditor: Fixed occasional incorrect encoding in messages sent from the Python console (stdout, stderr) into the Errors section of the editor.
  5. Updated documentation.

21 February 2020

MetaTrader 5 Build 2340: Managing account settings in the Tester and expanded integration with Python


  1. Added new functionality for working with SQLite databases.

    In the previous platform update, we introduced support for operations with SQLite databases directly from MQL5. The main functions have become available through the MetaEditor user interface:

    • Create and connect databases
    • View tables and perform quick data queries
    • Create and execute SQL queries and rollback changes

    How it works
    The quick database creation functionality is available from the MQL5 Wizard. You can easily create your first table and define its fields.

    Upon the database creation, you will be forwarded to a new Navigator section, which features commands for managing the data.

    Database tables are shown in the left-hand side window. Double-click on the table name to quickly query the first 1,000 records. In this navigator section, you can also create and open other databases, as well as work with tables.

    The database can be managed in the main editor window, in which you can fill in the table, search and select data, enter SQL queries and execute other operations:

    For further details about MetaTrader 5 operations with databases, please read the article entitled "SQLite: Native handling of SQL databases in MQL5".

  2. Expanded support for multi-lingual projects. This update provides further expanded possibilities for working with Python scripts:

    • Now, such scripts can be created using the MQL5 Wizard, while you can instantly add required library dependencies in the code.
    • Special icons have been added in the navigator and the relevant syntax is available in the editor.
    • When running a script via MetaEditor, messages from the Python console (stdout, stderr) appear under the Errors section.

    Click "Compile" in the editor to run the script:

    To work with Python, do not forget to specify its path under the Settings \ Compilers section in MetaEditor. To enable the use of the MetaTrader 5 library, install it using the following command:
    pip install MetaTrader5
    For Python integration details please read the relevant documentation.
  3. Added display of SQLite database files (*.db;*.sdb;*.sqlite;*.db3;*.s3db;*.sqlite3) in the Navigator.
  4. Fixed project property saving errors.


  1. Completely revised Python integration. The update involves many new functions and new command naming.

    New naming
    The existing commands have been renamed as follows:
    MT5Initialize       -> initialize
    MT5Shutdown         -> shutdown
    MT5TerminalInfo     -> terminal_info
    MT5Version          -> version
    MT5CopyRatesFrom    -> copy_rates_from
    MT5CopyRatesFromPos -> copy_rates_from_pos
    MT5CopyRatesRange   -> copy_rates_range
    MT5CopyTicksFrom    -> copy_ticks_from
    MT5CopyTicksRange   -> copy_tick_range

    New commands
    The list of supported commands has been expanded. Added trading functions, as well as functions for working with the trading history and for receiving financial symbol and current account data.

    • account_info() receives information about the current account. An analogue of AccountInfoInteger , AcountIndoDouble and AccountInfoString.
    • positions_total() receives the number of open positions. An analogue of PositionsTotal.
    • positions_get(symbol, ticket) receives open positions by symbol or ticket.
    • orders_total() receives the number of orders. An analogue of OrdersTotal.
    • orders_get(symbol, ticket) receives open orders by symbol or ticket.
    • history_orders_total(from, to) receives the number of orders in the specified historical time frame.
    • history_orders_get(from, to, position, ticket) receives orders from the specified historical time frame, by ticket or as filtered by position.
    • history_deals_total() receives the number of deals in the history. An analogue of HistoryDealsTotal.
    • history_deals_get(from, to, position, ticket) receives deals from the specified historical time frame, by ticket or as filtered by position.
    • symbol_info(symbol) receives information about a financial instrument. An analogue of SymbolInfoInteger, SymbolInfoDouble, SymbolInfoString.
    • symbol_info_tick(symbol) receives the last tick by symbol. An analogue of SymbolInfoTick.
    • symbol_select(symbol, enable) enables/disables a symbol in Market Watch. An analogue of SymbolSelect.
    • order_check(request) checks order margin. An analogue of OrderCheck.
    • order_send(request) sends an order to the server. An analogue of OrderSend.
    • order_calc_margin(action, symbol, volume, price) calculates margin for an order. An analogue of OrderCalcMargin.
    • order_calc_profit(action, symbol, volume, price_open, price_close) calculates profit. An analogue of OrderCalcProfit.

    Running Python scripts on charts
    Python scripts can be run directly on platform charts, similarly to regular MQL5 programs. These scripts are marked with special icons in the Navigator.

    Script messages will be displayed under the "Toolbox \ Experts" section. If a MetaTrader 5 library is used in the script, it can receive trading symbol and account data, as well as perform trading operations.

    Python scripts can be executed on the same chart in parallel with other MQL5 scripts and Expert Advisors. To stop a script with a looped execution, remove it from the chart.

    Additional protection
    To enable additional account protection when using third-party Python libraries, you may activate the "Disable automated trading via external Python API" option in terminal settings.

    Python scripts can only perform trading operations when this option is disabled.

  2. Significantly accelerated re-launch of MQL5 programs and re-creation of custom indicators from MQL5 programs. In some cases, operations are performed 100 times faster.
  3. Added functions for working with databases:

    Imports data from a file to a table.
    long  DatabaseImport(
       int           database,          // database handle received in DatabaseOpen
       const string  table,             // table name to insert data to
       const string  filename,          // file name to import data from
       uint          flags,             // combination of flags
       const string  separator,         // data separator
       ulong         skip_rows,         // number of first rows to skip
       const string  skip_comments      // string of characters, which define comments

    Exports a table or an SQL query result to a CSV file. The file is created in UTF-8 encoding.
    long  DatabaseExport( 
       int           database,           // database handle received in DatabaseOpen 
       const string  table_or_sql,       // table name or SQL query
       const string  filename,           // CSV file name for data export
       uint          flags,              // combination of flags
       const string  separator           // data separator in the CSV file

    Prints the table or SQL query result to the Experts journal.
    long  DatabasePrint(
       int           database,          // database handle received in DatabaseOpen
       const string  table_or_sql,      // table or SQL query
       uint          flags              // combination of flags

  4. Added FileSelectDialog function, which calls the system dialog creating/opening a file or a folder.
    int  FileSelectDialog(
       string   caption,              // window title
       string   initial_dir,          // initial directory
       string   filter,               // extension filter
       uint     flags,                // combination of flags
       string&  filenames[],          // array with file names
       string   default_filename      // default file name
    The new function enables the efficient user interaction with the MQL5 program.

  5. New DEAL_FEE value in the ENUM_DEAL_PROPERTY_DOUBLE enumeration. It is used for a deal fee. The value indicates a separate commission type charged by the broker.


  1. : Added functionality to specify custom trading account settings during strategy testing, such as trading limitations, margin settings and commission. The new functions provide extended capabilities for the modeling of various trading conditions.

    Common settings
    In this section, you can set the maximum number of open orders and positions, which can simultaneously exist on the account. Additionally, you can configure sessions during which the program is not allowed to trade.

    The section allows configuration of margin reserving rules and position accounting systems to be used in testing:

    • Risk management — risk management model: OTC and exchange model, netting and hedging systems. For details please read the Documentation.
    • Margin call level — when this level is reached, the account switches to the Margin Call state.
    • Stop out level — when this level is reached, all orders are canceled and all trading positions are closed. These levels can be indicated in percentage and in money. If "in money' is selected, the levels are defined as the account's Equity value. If "In percent" is selected, the levels are defined as the account "Margin level" value (Funds/Margin*100).
    • Unrealized profit — accounting for the current floating profit/loss in the free margin:
      • Do not use unrealized profit/loss — do not include profit/loss of open positions in the calculation.
      • Use unrealized profit/loss — include open positions' profit/loss in the calculation.
      • Use unrealized profit — include only profit.
      • Use unrealized loss — include only loss.
    • Daily fixed profit — accounting for the client's daily fixed profit/loss in the free margin:
      • Use daily fixed profit/loss — include in the free margin profit and loss received during a trading day.
      • Use daily fixed loss — include only loss received during the trade day. During the day, the obtained profit is accumulated in the special account field ("Blocked"). At the end of the trading day, the accumulated profit is released (zeroed) and is added to the account balance (included in the free margin).
    • Release fixed profit at the end of day — this option becomes available only if the option "Use daily fixed loss" is selected. If it is enabled, the accumulated profit will be released (and thus included in the free margin) at the end of the day. Otherwise this profit amount will remain blocked.


    This section provides control over commissions charged for all trading operations.

    • Commission may be single-level and multi-level, i.e. be equal regardless of the deal volume/turnover or can depend on their size. Appropriate data is displayed in the terminal.
    • Commission can be charged immediately upon deal execution or at the end of a trading day/month.
    • Different commissions can be charged depending on deal direction: entry, exit or both operation types.
    • Commission can be charged per lot or per deal.
    • Commission can be calculated in money, percentage or points.

  2. Optimized and accelerated work in the Market Scanner mode, during which multiple testing passes are run for all symbols available in the Market Watch.
  3. Deal or position size is now taken into account when calculating profit in pips. Previously, the calculation was only performed per one lot.
  4. Improved control over optimization results graph. The scroll option has been added for a zoomed optimization graph. Double-clicking on a graph point selects the corresponding result in the table of testing passes.
Updated documentation.