MetaTrader 5 build 2980: Push notifications for trade operations
What's new in MetaTrader 5
18 June 2021
Terminal
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
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.
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.
Fixed periodic synchronization of the MQL5 account state. Signal copying
could fail under certain conditions due to an error.
Fixed display of a selection of recommended Market products.
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.
MQL5
Fixed "-" operator error in the
implementation of complex numbers in the Standard Library (file
MQL5\Include\Math\Alglib\complex.mqh).
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) };
ProcessPoint(pt);
};
Fixed an error which occurred during the compilation of union with huge data arrays.
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.
Added control for the explicit presence of a constructor call for
classes/structures if their parent class does not have a default
constructor.
MetaEditor
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.
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.
Implemented faster launching of MetaEditor.
Fixed data display in the list of observed expressions during debugging. The list could display incorrect variable values under certain conditions.
Fixed automatic addition of ".py" extension to Python script files created using the MQL Wizard.