MetaTrader 5 build 2980: Push notifications for trade operations

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

18 June 2021

Terminal

  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.

MQL5

  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) };
       ProcessPoint(pt);
      };
  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.

MetaEditor

  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.