New MT5 build offers revamped Debugger, access to Depth of Market via Python API
The latest MetaTrader 5 build (2815) is out, offering a number of new functionalities and enhancements to existing ones.
For starters, the new build adds the 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 number 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.
The maximum length of Push messages has been increased from 256 to 1024 characters. Now, traders can send more information from their MQL5 programs on mobile devices.
Also, the build has 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. Users of the platform can view the amount of memory consumed by charts, CPU resources used by Expert Advisors and other performance metrics. If the platform performance slows down, the user can easily detect and fix the problem.
The Subscriptions service has been enhanced. 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
More new features have become available in the revamped debugger. For instance, arrays are now displayed in the observation window in accordance with the sorting set by ArraySetAsSeries.
Further, there is support for local static variables.
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.
Let’s recall that the previous MT5 build (2755) also offered a raft of enhancements. For instance, the Popup Prices window now enables 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.