Added quick position closing and orders deletion by a single mouse click.
Click the cross in "Profit" column of orders and positions list to close a position or remove a pending order.
If "One-click trading" option is enabled in the terminal settings, position will be closed immediately at the current price (order will be removed). If the option is disabled or quick closing is impossible (for example, for trading symbols having Request Execution type), the standard position closing (order removal) dialog will appear.
Projects folder in MQL5 directory has been implemented for common projects. It is shown in blue in Navigator.
Despite the fact that Projects folder is located inside MQL5, the projects are located separately from the user's personal directory (https://storage.mql5.com/svn/Personal/<MQL5.community
account>/MQL5).
All projects are stored in a separate section https://storage.mql5.com/svn/Projects/
The top-level directory in Projects folder is considered to be a project. Therefore, a new folder should be created in Projects section to create a project. Use "New Folder" option to create the new folder, select it and click "Create Project" in the context menu.
The project will be created. Reports on successful project creation will be displayed in MetaEditor's journal.
Access to each project is set only by a project author (a user who created it).
To start a teamwork on a project, you should allow other users to access it. Click "Add Permission" in the context menu of a created project folder and add a new user by specifying his or her MQL5.community login.
Click "Checkout" in "Projects" folder context menu to upload available projects. The projects will be uploaded from the storage. All further operations with them are similar to the ones with conventional files assigned to MQL5 Storage.
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Added request_id field in
MqlTradeResult structure - a unique identifier of the terminal trade
request during a network session.
This
field is filled by the client terminal when a trade request is
successfully sent to the server. Further on, this field is filled in
result parameter of OnTradeTransaction entry point. Therefore, the
opportunity of clear comparison of OrderSend and OrderSendAsync
functions calling with getting the trade request results at
OnTradeTransaction entry point is provided.
For ease of writing code, MetaEditor provides the possibility to insert snippets — small template fragments of source code describing a particular construction of the MQL5 language. Insertion of a snippet is initialized by typing the keyword. After you type the keyword the cursor is changed to "Snippet available". To insert a snippet, you should press "Tab". For more information about working with snippets please read the MetaEditor Help.
The key word for OnTradeTransaction entry point is OnTradeTransaction.All input parameters can now be included for optimization (the number of input parameters is limited by 1024). It means that the space that can have the maximum value to be written in the integer 1024-bit value can be used in the genetic search for the optimal parameters. The protocol of data transfer between the terminal and tester agents has been changed for big indices of the optimized variants.
Therefore, all previous versions of tester agents will not be able to connect to the cloud network and (or) the client terminal because of the protocol change and will be updated automatically via LiveUpdate system.Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
The MetaTrader 5 for iPhone can be downloaded at https://download.mql5.com/cdn/mobile/mt5/ios?hl=en&utm_source=www.metatrader5.com
Added OnTradeTransaction entry point - getting information about trade transactions performed for a trade account.
void OnTradeTransaction(const MqlTradeTransaction& trans,const MqlTradeRequest& request,const MqlTradeResult& result)
The entry point is called to transfer the data on the trade transactions performed for a trade account to MQL5 program:
The client terminal stores the history of transactions and
consistently transfers them to an Expert Advisor, if an entry point is
present. The history is limited to 1024 transactions and cleared during
the next connection.
Note that transactions processing in the terminal is performed independent of transactions processing in MQL5 program. For example, while an Expert Advisor processes a transaction to add a new order, the terminal can at the same time get a transaction to delete the appropriate order and move it to history.
MQL5: Enhanced ENUM_DEAL_TYPE "deal types" enumeration values set. The following values are added:
CCanvas class allows to implement various graphics on custom charts of "Bitmap" and "Bitmap Label" types. In fact, these objects turn into a surface for drawing any image. Thus, it is possible to create custom graphical objects, apart from the ready-made terminal ones.
The class implements the functions for drawing lines, circles, rectangles, polygons, their filling and filling any area in a specified color. Besides, the client terminal distribution kit now has the example of the class application CanvasSample (MQL5\Scripts\Examples\Canvas\CanvasSample.mq5).
Added saving the intermediate data of the genetic
optimization - the optimization process will start from where it was
stopped, not from the beginning.
Profiling results are exported in HTML, CSV and OpenXML formats. To move to a specific code line, just double-click on the appropriate profiling report line.
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
The client terminal supports sending messages concerning various events to iOS and Android powered devices using push notifications. With this feature, traders are always aware of all events.
Push notifications are short messages consisting of not more than 255 symbols. Such notifications are delivered immediately and they cannot be lost along the way.
Push notifications can be sent in two ways from the client terminal:
Via MQL5 application
Special SendNotification function is available in MQL5 language allowing MQL5 application to send push notifications to MetaQuotes ID specified in the terminal settings.
Via signals function
The client terminal allows to create the signals used to notify about the market events. They are set at the "Alerts" tab of the "Toolbox" window. One type of alerting about the events is sending push notifications.
Check "Enable Push Notifications" box to allow the client terminal to send messages.
Then, specify one or several MetaQuotes IDs separated by commas. To find out your MetaQuotes ID, open the mobile version of the terminal and go to Settings -> Messages page. That is how that page looks in the mobile terminal for iPhone:
Press "Test" button to test messages sending. If sending is successful, you will see the appropriate message and the test notification will be delivered to your mobile device.
Added the button link to MQL5.community website at the client terminal toolbar.
"Charts" and "Objects" tabs are combined into one in the terminal settings.
32-bit version of the terminal has been compiled with the possibility to expand the available virtual address space. The volume of the available memory is expanded from 2 Gb:
Added display of "Label" and "Bitmap Label" graphical objects sizes in their properties dialog:
Added ResourceCreate function - for loading a resource from a file or creating an image:
Creating the resource from the file:
bool ResourceCreate( const string resource_name, // resource name const string path // relative path to the file );Creating an image based on the pixels array:
bool ResourceCreate( const string resource_name, // resource name const color& data[], // data set as an array uint img_width, // created resource image width uint img_height, // created resource image height uint data_xoffset, // horizontal offset of the upper left corner of the created image to the right uint data_yoffset, // vertical downward offset of the upper left corner of the created image uint data_width, // image total width based on data set ENUM_COLOR_FORMAT color_format // color handling method );
The first case of the function allows to load images and sounds from files, the second case allows only to create images dynamically. Images must be in BMP format, color depth - 24 or 32 bits, sounds can only be in WAV format. A resource size must not exceed 16 Mb.
Renamed ENUM_ORDER_TYPE_FILLING enumeration elements:
Standard Library.
Added the ability to test the indicators including the ones downloaded from MQL5 Market:
Therefore, it is now possible to evaluate behavior of an indicator during the changes in history.
Corrections in test results reports:
Added С++ files (*.cpp) compilation support in case Microsoft Visual Studio 2008/2010/Express is installed.
Thus, it is possible to debug and modify custom DLLs written in С++ right in MetaEditor.
by dragging DLL on an open MQL5 source code file:
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Added global search in the client terminal and at MQL5.com.
The Search in the terminal allows you to quickly find information in all sections of the client terminal, Code Base and MQL5.com.
It is a case-insensitive search for a substring. The search is performed in the sections selected in the search parameters:
The context menu of the search results tab contains additional commands, which depend on the type of results:
Added asynchronous sending of trade requests OrderSendAsync.
Using this feature allows to speed up placing of trade requests, and especially when placing mass request, since in this case there is no need to wait for the results of the previous request when placing a new one. Because of its asynchronous nature, this function is not suitable for placing market orders for symbols with the Request execution mode.
The function performs the initial verification of a request on the side of the client terminal and enqueues it to send to the trade server without waiting for the results of sending and receiving of confirmation from the server.
If necessary, the operation of the function on the server is monitored by an Expert Advisor by handling the OnTrade event.
ISIN, International Securities Identification Number is a 12-digit alphanumeric code that uniquely identifies a security.
The availability of this symbol property is defined on the trade server side.
Maximum Favorable Excursion (MFE) - is the maximum potential profit reached while holding a position.
MFE-Profit Correlation - a correlation between the position returns and MFE. Each trade had its maximal profit and maximal loss between opening and closing. MFE shows profit in the favorable excursion of the price. Each trade is corresponded with its return and with two parameters - MFE and MAE. Thus, we can draw each trade on a plane where MFE is plotted along the Х-axis, the return is plotted along the Y-axis. The closer is the return to the MFE, the more complete was the favorable excursion of the price was used. The straight on the graph shows approximation by function Profit=A*MFE+B. The Correlation(Profits,MFE) allows to estimate relation between the profits/losses and the MFE. The closer to 1 is this value, the better will the trades fit into the approximation straight. The closer to zero it is, the less considerable is this relation. MFE characterizes the ability to realize potential profit.
Graph of MFE-Profits Distribution - points plotted on the graph MAE (X-axis) - Profits (Y-axis) indicate positions. Values of both axes are given in the deposit currency. Thus, for each transaction we see not only the acquired profit value including swaps along the Y-axis, but also maximally possible profit during the position lifetime. It allows us to estimate the quality of protection of the paper (unrealized) profit. Though the distribution of points along the chart gives a satisfactory view of the trade system, a linear regression, which is a least squares approximation, is given for an objective assessment. Ideally, the line should make with the X-axis an angle of 45 degree.
Maximum Adverse Excursion (MAE) is the maximum potential loss reached while holding a position.
MAE-Profit Correlation - a correlation between the position results and MAE. MAE - Maximum Adverse Excursion. Each trade reached its maximal profit and maximal loss between opening and closing. MAE shows the loss during the adverse excursion of the price. Each trade is corresponded with its return and with two parameters - MFE and MAE. Thus, we can plot each trade on a plane where MAE is plotted along the Х-axis, the return is plotted along the Y-axis. The closer is the return to the MAE, the more complete was the protection against the adverse excursion of the price. The straight on the graph shows approximation by function Profit=A*MAE+B. The Correlation(Profits,MAE) allows to estimate relation between the profits/losses and the MAE. The closer to 1 is this value, the better will the trades fit into the approximation straight. The closer to zero it is, the less considerable is this relation. MAE characterizes the drawdown obtained within the position lifetime and characterizes the use of protective Stop Loss best of all.
Graph of MAE-Profits Distribution - Points plotted on the graph MAE (X-axis) - Profits (Y-axis) indicate positions. Values of both axes are given in the deposit currency. Thus, for each transaction we see not only the acquired profit value including swaps along the Y-axis, but also the maximal drawdown within the position lifetime. It allows us to estimate the transaction according to drawdown waiting out. Though the distribution of points along the chart gives a satisfactory view of the trade system, a linear regression, which is a least squares approximation, is given for an objective assessment. The less trades have negative values X (MAE), the better. It also allows making a decision based on the graphical analysis about maximally accepted losses, after which the possibility of taking profit is very small (if the analysis is carried out on the same currency pair and in points).
Added new commands for managing the storage of source files that make the use of the MQL5 Storage even more convenient:
Revert to revision - selected files are replaced by the files from the specified revision. All changes made to the selected files disappear.
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
The MetaTrader 5 for iPhone can be downloaded at https://download.mql5.com/cdn/mobile/mt5/ios?hl=en&utm_source=www.metatrader5.com
Through the OBJPROP_HIDDEN property set only from MQL5 programs, graphical objects are divided into manually created and automatically created objects. By default, the list shows only the manually created objects to keep the window well organized. To see all objects, click "List All".
Now objects created by programs are not deleted by the command "Delete last (Backspace)".
This prevents accidental removal of interface objects. They can be deleted programmatically or through the List of Objects (Ctrl + B) window.
Added display of the beginning and end of symbol trading in the symbol settings dialog:
Overloading of operations allows to describe operations with the meaning equivalent to those already existing in the language and apply them to the types of data created by the programmer. For example, overloading of operator "[]" allows you to implement a class with the behavior of an array. Overloading arithmetic operators allows to implement classes for working with complex numbers. In the above cases, overloading of operations allows to use of familiar syntax and avoid creation of numerous functions like ComplexPlusComplex, IntegerPlusComplex, ComplexMinusFloat, etc.
In addition, support for operator overloading in MQL5 provides compatibility with general-purpose programming languages (particularly with C++), facilitating the translation of previously written code (software libraries) into MQL5.
Static fields and methods are the property of the class, so there is no need to create class instances to access its static fields. Use of static fields and methods in the language improves its flexibility and expressiveness. For example, using these methods you can easily implement control over the number of class instances (objects).
Like with the support of operator overloading, support for operator overloading in MQL5 provides compatibility with general-purpose programming languages (particularly with C++), facilitating the translation of previously written code (software libraries) into MQL5.
Expanded the set of characteristics in testing results - added new features and diagrams:
Previously, if there were less than 5 minutes to the time of pending order deletion, an incorrect error TRADE_RETCODE_INVALID_EXPIRATION was returned at the attempt of correct order modification.
When you run an Expert Advisor in the strategy tester, you can create your own data array based on the simple types or simple structures. This data set can be saved using the FrameAdd() function in a special structure called a frame. During the optimization of an Expert Advisor, each agent can send a series of frames to the terminal. All the received frames are written in the file *.MQD in the folder terminal_directory/MQL5/Files/Tester expert named as the Expert Advisor. They are written in the order they are received from the agents.
Optimize passing of frames from the tester to the client terminal and increased the speed of access to the frames received from the Expert Advisor at the entry points OnTesterPass.
Removed default highlighting the current line. In the previous versions, during the initial installation of MetaEditor highlighting of the current line was enabled by default.
In the MQL5 Wizard added support for the OnTester* entry points.
These entry points are handlers of events that are automatically generated by the strategy tester during testing (OnTester) and optimization (OnTesterInit, OnTesterPass, OnTesterDeinit) of Expert Advisors. Use of these functions in the EA allows to implement custom handling of testing and optimization results.
For ease of writing code, MetaEditor provides the possibility to insert snippets — small template fragments of source code describing a particular construction of the MQL5 language. Insertion of a snippet is initialized by typing the keyword. After you type the keyword the cursor is changed to "Snippet available". To insert a snippet, you should press "Tab". For more information about working with snippets please read the MetaEditor Help.
The keywords for the entry points OnTester, OnTesterInit, OnTesterPass and OnTesterDeinit are OnTester, OnTesterInit, OnTesterPass and OnTesterDeinit.
For ease of programming, MetaEditor provides various tools from auto substitutions of names and tips to the functions to anchors and hot keys - MetaAssist. These tools allow you to speed up the process of code writing, make navigation easier and help prevent errors.
Added the window displaying the differences between a source text local file and a version stored in MQL5 Storage:
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Added new display mode of volumes "Amount" for forex instruments in the Depth of Market. The new mode allows you to see requests in lots and in the quoted currency.
Added new methods FrameAdd, FrameFirst, FrameNext and FrameInputs, allowing testing agents to pass their own custom data frames to the terminal and allowing the terminal to read them.
With the new methods you can implement distributed computing to produce results in any convenient form, and not only in the form of one or more numeric values. By connecting to the MQL5 Cloud Network, you can solve any distributed tasks in MQL5, not necessarily, however, related to the financial markets.
Added new entry points OnTesterInit, OnTesterDeinit and OnTesterPass. During the optimization of an Expert Advisor with these entry points, a chart to attach the EA to is created in the terminal. When a new data frame is received from testing agents, OnTesterPass is called, in which the received data can be read and analyzed. A detailed description is available in the documentation.
Added new properties TERMINAL_MEMORY_PHYSICAL, TERMINAL_MEMORY_TOTAL, TERMINAL_MEMORY_AVAILABLE, TERMINAL_MEMORY_USED, TERMINAL_X64, TERMINAL_OPENCL_SUPPORT, TERMINAL_DISK_SPACE, TERMINAL_CPU for TerminalInfoInteger.
New features allow MQL5 programs to analyze the environment in which they run, and based on this make decisions about the use of various resources. These properties will be useful in complex Expert Advisors that require large amounts of resources. Now, during the optimization of such an Expert Advisor in the MQL5 Cloud Network, you can implement checks of available memory of an agent in the EA's OnInit, and in case of a potential shortage of memory not to start the testing process. Also, to make access to new properties easier, added the CTerminalInfo class. A detailed description is available in the documentation.
In the log of changes of the MQL5 Storage you now can revert changes to a certain revision.
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
Fixed errors reported on the forum and in crash logs.
Updated documentation.
The live update is available through the LiveUpdate system.
The MetaTrader 5 Trading Terminal can be downloaded at https://download.mql5.com/cdn/web/metaquotes.ltd/mt5/mt5setup.exe?utm_source=www.metatrader5.com
The MetaTrader 5 for iPhone can be downloaded at https://download.mql5.com/cdn/mobile/mt5/ios?hl=en&utm_source=www.metatrader5.com