Release Notes: MetaTrader 4

MetaTrader 4 Forex Trading Platform

19 May 2017
MetaTrader 4 build 1090
The new version of MetaTrader 4 platform fixes some bugs in the operation of the client terminal.
12 May 2017
MetaTrader 4 build 1080

A month ago, Microsoft released a major update of their operating system Windows 10 Creators Update (version 1703). After installing this update, some users were unable to run MQL4 programs in their terminals. This issue has been fixed in the new MetaTrader 4 platform build 1080. Now, Expert Advisors and indicators will run on charts correctly, while recompilation using the updated MetaEditor is not required.

Support for MetaTrader 4 client terminal versions below 1065 will be discontinued on the 1st of October 2017. Unsupported terminal builds will not be able to connect to new server versions. We strongly recommend that you update your terminals in advance.

23 March 2017
MetaTrader 4 Platform build 1065

In the new version, an error has been fixed connected with the restart of Expert Advisors on charts after switching timeframes. Now, Expert Advisors do not stop, and are correctly re-initialized.

3 February 2017
MetaTrader 4 Platform build 1045

The release of MetaTrader 4 platform is connected with the release of Windows 10 Insider Preview build 15007. Due to security updates in the new Windows 10 system version, MetaTrader 4 client terminals could occasionally fail to start.

Install the new platform version in order to prepare for the upcoming Windows 10 update.

16 December 2016
MetaTrader 4 build 1031
We are fixed some bugs based on crash reports.
14 October 2016
MetaTrader 4 Android build 996
  1. Added chat enabling traders to chat with other MQL5.community members. Specify the desired user's login in a message recipient's section to send a message directly to this user's mobile device.

  2. Added ability to edit indicator levels.
  3. Added interface translations into Indonesian and Hindi.
30 August 2016
MetaTrader 4 iOS build 975
  1. A new design of messages. Now, MQL5.community messages and push notifications from the desktop platform are displayed as chats similar to popular mobile messengers. 
  2. Now it is possible to switch to one of the 22 available languages straight from the platform. Choose any UI language from the "Settings" section ("About" in iPad) without changing the language setting of your device.
18 August 2016
MetaTrader 4 build 1010: New opportunities of MQL4

Terminal

  1. Fixed an error which prevented execution of MQL4 applications in terminals running in 32-bit Windows 10, build 1607.
  2. Fixed occasional incorrect display of the Search and Chat buttons.
  3. Fixed occasional duplicate welcome-emails delivered to the terminal when opening a demo account.

MQL4

  1. Added new 'void *' pointers to enable users to create abstract collections of objects. A pointer to an object of any class can be saved to this type of variable. It is recommended to use the operator dynamic_cast<class name *>(void * pointer) in order to cast back. If conversion is not possible, the result is NULL.
    class CFoo { };
    class CBar { };
    //+------------------------------------------------------------------+
    //| Script program start function                                    |
    //+------------------------------------------------------------------+
    void OnStart()
      {
       void *vptr[2];
       vptr[0]=new CFoo();
       vptr[1]=new CBar();
    //---
       for(int i=0;i<ArraySize(vptr);i++)
         {
          if(dynamic_cast<CFoo *>(vptr[i])!=NULL)
             Print("CFoo * object at index ",i);
          if(dynamic_cast<CBar *>(vptr[i])!=NULL)
             Print("CBar * object at index ",i);
         }
       CFoo *fptr=vptr[1];  // Will return an error while casting pointers, vptr[1] is not an object of CFoo
      }
    //+------------------------------------------------------------------+
  2.  Added support for the operator [ ] for strings. The operator enables users to get a symbol from a string by index. If the specified index is outside the string, the result is 0.
    string text="Hello";
    ushort symb=text[0];  // Will return the code of symbol 'H'
    
  3.  The CopyXXX function that copies history and tick data has become faster.
  4.  Fixed deletion of multiple graphical objects with the specified prefix using the ObjectDeleteAll function. Before the update, the remaining objects could be displayed in a wrong order after the execution of this function.
  5.  Fixed occasional incorrect order of graphical objects display after changing the timeframe.

Hosting

  1. During terminal synchronization with the virtual server, charts without Expert Advisors are ignored now, even if custom indicators are running on these charts. If you need to migrate a custom indicator, run it on the chart of an "empty" Expert Advisor that does not perform operations. Such an Expert Advisor can be easily generated using the MQL4 Wizard in MetaEditor by selecting "Expert Advisor: template". This update is to ensure that indicators are migrated on purpose.
  2. You can now synchronize Expert Advisors and custom indicators whose names contain non-Latin characters (e.g. Cyrillic or Chinese characters).

Fixed errors reported in crash logs.


1 July 2016
MetaTrader 4 build 985: Built-in MQL5.community Chat

Terminal

  1. New built-in chat. Now, traders can chat with their MQL5.community friends and fellow traders straight from the platform. The chat maintains the history of messages, as well as it features the number of unread messages. To start a chat, log in to your MQL5 account straight from the chat window or via the platform settings: 'Tools' -> 'Options' -> 'Community'.




  2. Optimized reading of the internal mail database when the terminal starts.

MQL4

  1. Added an option to show/hide the price and time scale on any chart. In earlier versions, an MQL4 application could only change the CHART_SHOW_PRICE_SCALE and CHART_SHOW_DATE_SCALE properties of the chart, on which it was running.
  2. New MODE_CLOSEBY_ALLOWED property for the MarketInfo function. TRUE means that the Close By operation (closing by a counter position) is allowed for the specified financial symbol.
  3. Fixed passing of a string parameter to the OnChartEvent entry point. The error could cause a false value of the parameter. OnChartEvent allows tracking chart events: keypress events, mouse movement and more.
  4. Implemented faster deletion of multiple graphical objects using the ObjectsDeleteAll function.

Signals

  1. Improved automated matching of currency pairs containing RUB and RUR.

Tester

  1. Fixed stamping of graphical object creation time during testing. In earlier versions, the current terminal time was added instead of testing time.

MetaEditor

  1. Fixed setting of focus in the replace text field when opening a replace dialog box.
  2. Fixed replacing of multiple text occurrences when you search upwards starting from the current positions.
Fixed errors reported in crash logs.


3 June 2016
MetaTrader 4 Build 970: Simplified demo account opening and expanded MQL4 features

Terminal

  1. Simplified demo account creation dialog. You do not have to fill the large form any more. Simply specify basic data and select trading parameters: account type, deposit and leverage.




MQL4

  1. The format of the executable EX4 files has changed to implement the new features of the MQL4 language. All EX4 applications compiled in previous builds of MetaEditor will work properly after the update. Thus, the upward compatibility is fully preserved.

    EX4 programs compiled in build 970 and above will not run in old terminal builds - backward compatibility is not supported.

  2. Added support for abstract classes and pure virtual functions.

    Abstract classes are used for creating generic entities, that you expect to use for creating more specific derived classes. An abstract class can only be used as the base class for some other class, that is why it is impossible to create an object of the abstract class type.

    A class which contains at least one pure virtual function in it is abstract. Therefore, classes derived from the abstract class must implement all its pure virtual functions, otherwise they will also be abstract classes.

    A virtual function is declared as "pure" by using the pure-specifier syntax. Consider the example of the CAnimal class, which is only created to provide common functions – the objects of the CAnimal type are too general for practical use. Thus, CAnimal is a good example for an abstract class:
    class CAnimal
      {
    public:
                          CAnimal();     // Constructor
       virtual void       Sound() = 0;   // A pure virtual function
    private:
       double             m_legs_count;  // How many feet the animal has
      };
    Here Sound() is a pure virtual function, because it is declared with the specifier of the pure virtual function PURE (=0).

    Pure virtual functions are only the virtual functions for which the PURE specifier is set: (=NULL) or (=0). Example of abstract class declaration and use:
    class CAnimal
      {
    public:
       virtual void       Sound()=NULL;   // PURE method, should be overridden in the derived class, CAnimal is now abstract and cannot be created
      };
    //--- Derived from an abstract class
    class CCat : public CAnimal
     {
    public:
      virtual void        Sound() { Print("Myau"); } // PURE is overridden, CCat is not abstract and can be created
     };
    
    //--- examples of wrong use
    new CAnimal;         // Error of 'CAnimal' - the compiler returns the "cannot instantiate abstract class" error
    CAnimal some_animal; // Error of 'CAnimal' - the compiler returns the "cannot instantiate abstract class" error
    
    //--- examples of correct use
    new CCat;  // no error - the CCat class is not abstract
    CCat cat;  // no error - the CCat class is not abstract
    Restrictions on abstract classes
    If the constructor for an abstract class calls a pure virtual function (either directly or indirectly), the result is undefined.
    //+------------------------------------------------------------------+
    //| An abstract base class                                           |
    //+------------------------------------------------------------------+
    class CAnimal
      {
    public:
       //--- a pure virtual function
       virtual void      Sound(void)=NULL;
       //--- function
       void              CallSound(void) { Sound(); }
       //--- constructor
       CAnimal()
        {
         //--- an explicit call of the virtual method
         Sound();
         //--- an implicit call (using a third function)
         CallSound();
         //--- a constructor and/or destructor always calls its own functions,
         //--- even if they are virtual and overridden by a called function in a derived class
         //--- if the called function is purely virtual
         //--- the call causes the "pure virtual function call" critical execution error
        }
      };
    However, constructors and destructors for abstract classes can call other member functions.

  3. Added support for pointers to functions to simplify the arrangement of event models.

    To declare a pointer to a function, specify the "pointer to a function" type, for example:
    typedef int (*TFunc)(int,int);
    Now, TFunc is a type, and it is possible to declare the variable pointer to the function:
    TFunc func_ptr;
    The func_ptr variable may store the pointer to function to declare it later:
    int sub(int x,int y) { return(x-y); }
    int add(int x,int y) { return(x+y); }
    int neg(int x)       { return(~x);  }
    
    func_ptr=sub;
    Print(func_ptr(10,5));
    
    func_ptr=add;
    Print(func_ptr(10,5));
    
    func_ptr=neg;           // error: neg is not of  int (int,int) type
    Print(func_ptr(10));    // error: there should be two parameters
    Pointers to functions can be stored and passed as parameters. You cannot get a pointer to a non-static class method.

  4. Added TERMINAL_SCREEN_DPI value to the ENUM_TERMINAL_INFO_INTEGER client terminal property enumeration — data display resolution is measured in dots per inch (DPI). Knowledge of this parameter allows specifying the size of graphical objects, so that they look the same on monitors with different resolution.
  5. Added TERMINAL_PING_LAST value to the ENUM_TERMINAL_INFO_INTEGER client terminal properties — the last known value of a ping to a trade server in microseconds. One second comprises of one million microseconds.
  6. DRAW_NONE buffers (no graphical constructions) now do not participate in a chart window minimum and maximum calculations in custom indicators.
  7. Fixed generating events related to mouse movement and mouse button pressing over objects of OBJ_LABEL and OBJ_TEXT types. Previously, the events were generated incorrectly if they were within other objects of OBJ_RECTANGLE_LABEL and OBJ_RECTANGLE types.
  8. Fixed plotting zero-height histogram bars in custom indicators. Previously, such bars were not displayed, while now they have a height of 1 pixel.

Signals

  1. Fixed searching for trading symbols when comparing available trading symbols of a signal provider and subscriber.

Tester

  1. Fixed use of spread in fxt file if the current spread is used in the test settings.

Market

  1. Fixed a few Market showcase display errors.

MetaEditor

  1. Fixed search of words by files in "Match Whole Word Only" mode.
  2. Added moving to a file by double-clicking on the necessary file's compilation result line.
  3. Fixed display of some control elements in Windows XP.

Fixed errors reported in crash logs.

18 May 2016
MetaTrader 4 Android build 952
  1. Added a pop-up window with detailed information on deals. Examine order open and close time, browse through your comments to positions, and find out the broker commission in a single tap.
  2. Added the red line corresponding to the last bar's Ask price allowing you to manage your trading more accurately.
  3. Improved news management. Select and read the news you really find useful and add desired materials to favorites.
  4. All changes of the analytical object settings are saved after closing the application.
6 May 2016
MetaTrader 4 iOS build 947

Now, you can set a PIN code to access the application. This will provide additional protection for your accounts even if you lose your mobile device. Enable "Lock Screen" in the application settings. By default, the PIN code is similar to the one used to access the one-time password generator.

Also, the new version includes multiple improvements and fixes.

23 February 2016
MetaTrader 4 Web Platform: Full set of technical indicators and 38 languages

The new version of the MetaTrader 4 web platform features the full set of indicators for technical analysis. The web platform now contains 30 most popular technical analysis tools featured by the MetaTrader 4 desktop version:

Accelerator Oscillator
DeMarker Moving Average
Accumulation/Distribution  Envelopes Moving Average of Oscillator
Alligator Force Index
On Balance Volume
Average Directional Movement Index Fractals Parabolic SAR 
Average True Range
Gator Oscillator Relative Strength Index 
Awesome Oscillator Ichimoku Kinko Hyo Relative Vigor Index
Bears Power
MACD Standard Deviation
Bollinger Bands
Market Facilitation Index
Stochastic Oscillator
Bulls Power
Momentum Volumes
Commodity Channel Index
Money Flow Index Williams' Percent Range

The web platform interface is now available in 38 languages. 14 new languages have recently been added:

Dutch
Lithuanian Croatian
Greek Romanian Czech
Hebrew Serbian
Swedish
Italian Slovenian
Estonian
Latvian
Finnish



Launch the web platform right now to test the new functionality!

15 February 2016
MetaTrader 4 Web Platform now features Bill Williams' indicators

The new version of the MetaTrader 4 Web Platform features faster chart performance, which is provided by the use of the new WebGL technology — now even with multiple running indicators, the web platform maintains optimal performance.

The web platform now features technical indicators. The following Bill Williams' indicators have already been added:

  1. Alligator
  2. Fractals
  3. Market Facilitation Index
  4. Awesome Oscillator
  5. Accelerator Oscillator
  6. Gator Oscillator
The web platform interface has additionally been translated to Hindi, Uzbek and Ukrainian.
15 January 2016
MetaTrader 4 iOS build 945
  • Added portrait mode for iPad. Now, you can browse through long lists of trading operations, as well as read your mail and financial news more conveniently.
  • Added native support for iPad Pro.
  • Added Korean language.
23 December 2015
MetaTrader 4 build 950: Built-in video and performance improvements

Virtual Hosting

  1. Added a link to the video tutorial "How to rent a virtual platform" into the Virtual Hosting Wizard dialog. Watch the two-minute video to learn how to easily launch a trading robot or copy signals 24/7.


    This video as well as many others is available on the official MetaQuotes Software Corp. YouTube channel.

Terminal

  1. Fixed sorting of MQL4 programs in the sub-folders of the Navigator window. Applications are sorted by name.
  2. Fixed drawing of the network connection status indicator on ultra-high-definition screens (4K).
  3. Fixed display of the print preview window in the News section.
  4. A full-featured search function has been added to the log viewer of the terminal, Expert Advisors, Strategy Tester and Virtual Hosting. You can search forward and backward, search for whole words and toggle case sensitivity.

MetaEditor

  1. Added a link to the tutorial video "How to assemble a trading robot" to the MQL4 Wizard. Watch the three-minute video and develop a trading robot without writing a single line of code.


    This video as well as many others is available on the official MetaQuotes Software Corp. YouTube channel.

MQL4

  1. Fixed the value returned by the SignaBaseTotal function. In some cases, the function could return a zero value instead of the total number of signals available in the terminal.
  2. Fixed editing of graphical object visibility on different timeframes from MQL4 programs. In some cases, the object could be invisible on a chart after changing this property.

Tester

  1. Fixed display of price values and SL\TP levels in testing results.
Fixed errors reported in crash logs.


11 December 2015
MetaTrader 4 build 940: Optimized for ultra-high-resolution (4K) displays

Terminal

  1. The terminal interface has been completely adapted for ultra-high-resolution (4K) displays. All user interface elements are properly displayed on large screens. On smaller screens, the UI elements are automatically enlarged for better readability.




MQL4

  1. Fixed a bug that could occasionally cause "Error writing EX4" during compilation in Windows 10.
  2. Fixed a bug that could occasionally cause errors while loading external DLLs in scripts and Expert Advisors.

Virtual Hosting

  1. Fixed migration of trading environment with a custom indicator containing an EX4 library call, if the indicator is called from an Expert Advisor.

Signals

  1. Fixed error notifications on the signal subscription page. For example, notifications about the absence of required symbols for copying, about different trading conditions, etc.

MetaEditor

  1. Fixed arrangement of open windows, if one of them is maximized. Open files can be tiled, cascaded, arranged vertically and horizontally using appropriate commands of the Window menu.


Fixed errors reported in crash logs.
26 November 2015
MetaTrader 4 build 920: Faster operation and managing a visual test from the configuration file

Terminal

  1. Fixed initial and periodical scanning of trade servers in the trading account opening dialog. Now, availability and pings are defined in a timely manner with no need for manual scanning.




  2. Optimized and accelerated the client terminal operation.
  3. The terminal interface has been further adapted for high resolution screens (4K).

MQL4

  1. Fixed downloading custom indicators from MQL4 applications' resources. Indicators are included into resources via the #resource directive. This allows creating "all-in-one" applications that are much easier to distribute.
  2. Fixed the accuracy of the level value display in custom indicators. Previously, the accuracy always comprised 4 decimal places, while now it depends on the accuracy of an appropriate custom indicator values.
  3. Fixed checking the possibility of reducing an object of one type to another type as a result of inheritance when passing the object as a method\function parameter.
  4. Fixed recalculation of standard indicators on a specified buffer (iIndicatorOnArray) in case the data is set by an array having a fixed size. Previously, the indicator was not recalculated occasionally.
  5. Fixed errors in class templates.

Tester

  1. Added ability to manage visualization mode when launching the tester from the configuration ini file. The new TestVisualEnable parameter (true/false) has been implemented for that. If the parameter is not specified, the current setting is used.
  2. Fixed an error in the CopyXXX functions that caused the real history data, instead of the test history one, to be returned.
  3. Fixed reading test parameters from the configuration ini file passed in the command line.
  4. Fixed excessive memory deallocation after closing a visual testing chart, which occasionally made history data unavailable for actually operating Expert Advisors.

Fixed errors reported in crash logs.

12 November 2015
MetaTrader 4 build 910: Enhanced Code base and improved interface for Windows 10

Code Base

  1. Fixed and accelerated downloading MQL4 programs from the Code Base. Download free source codes of trading robots and indicators directly in the platform.

Terminal

  1. Fixed unloading price history from memory. An error occurred previously in case of insufficient memory.
  2. Fixed display of some user interface elements when working in Windows 10.
  3. Fixed removing graphical objects from the chart using the Backspace key.

Signals

  1. Improved and fixed translations of the trading signals showcase.

MQL4

  1.  Added the SYMBOL_VISIBLE read-only property to the ENUM_SYMBOL_INFO_INTEGER enumeration.
  2. Fixed template operation.
  3. Fixed the ArrayCopy function behavior when copying a string array in case the data area of a data source and receiver overlap entirely or partially.

Tester

  1. Added a limitation when testing demo versions of indicators and Expert Advisors from MQL5 Market. Now, testing of paid products' demo versions is forcefully completed one week prior to the current terminal date.

MetaEditor

  1. Fixed occasional conflicts between tooltips and other applications.


Fixed errors reported in crash logs.

22 October 2015
MetaTrader 4 Build 900: Class Templates in MQL4 and Optimized Memory Use

Terminal

  1. Fixed changing a password for an inactive (unconnected) account.




  2. Optimized use and release of memory when working with large amounts of historical data.
  3. Fixed and optimized working with a large number of news categories.

Signals

  1. Fixed unsubscribing from signals via the Navigator window context menu.



MQL4

  1. Added class templates allowing you to create parametrized classes like in C++. That enables even greater abstraction and ability to use the same code for working with objects of different classes in a uniform manner. An example of using:
    //+------------------------------------------------------------------+
    //|                                                    TemplTest.mq5 |
    //|                        Copyright 2015, MetaQuotes Software Corp. |
    //|                                             https://www.mql5.com |
    //+------------------------------------------------------------------+
    #property copyright "Copyright 2015, MetaQuotes Software Corp."
    #property link      "https://www.mql5.com"
    #property version   "1.00"
    //+------------------------------------------------------------------+
    //| Declare a template class                                         |
    //+------------------------------------------------------------------+
    template<typename T>
    class TArray
      {
    protected:
       T                 m_data[];
    
    public:
    
       bool              Append(T item)
         {
          int new_size=ArraySize(m_data)+1;
          int reserve =(new_size/2+15)&~15;
          //---
          if(ArrayResize(m_data,new_size,reserve)!=new_size)
             return(false);
          //---
          m_data[new_size-1]=item;
          return(true);
         }
       T                 operator[](int index)
         {
          static T invalid_index;
          //---
          if(index<0 || index>=ArraySize(m_data))
             return(invalid_index);
          //---
          return(m_data[index]);
         }   
      };
    //+------------------------------------------------------------------+
    //| Template class of a pointer array. In the destructor, it deletes |
    //| the objects, the pointers to which were stored in the array.     |
    //|                                                                  |
    //| Please note the inheritance from the TArray template class       |
    //+------------------------------------------------------------------+
    template<typename T>
    class TArrayPtr : public TArray<T *>
      {
    public:
       void             ~TArrayPtr()
         {
          for(int n=0,count=ArraySize(m_data);n<count;n++)
             if(CheckPointer(m_data[n])==POINTER_DYNAMIC)
                delete m_data[n];
         }
      };
    //+------------------------------------------------------------------------+
    //| Declare the class. Pointers to its objects will be stored in the array |
    //+------------------------------------------------------------------------+
    class CFoo
      {
       int               m_x;
    public:
                         CFoo(int x):m_x(x) { }
       int               X(void) const { return(m_x); }
      };
    //+------------------------------------------------------------------+
    //|                                                                  |
    //+------------------------------------------------------------------+
    TArray<int>     ExtIntArray;   // instantiate TArray template (specialize TArray template by the int type)
    TArray<double>  ExtDblArray;   // instantiate TArray template (specialize TArray template by the double type)
    TArrayPtr<CFoo> ExtPtrArray;   // instantiate TArrayPtr template (specialize TArrayPtr template by the CFoo type)
    //+------------------------------------------------------------------+
    //| Script program start function                                    |
    //+------------------------------------------------------------------+
    void OnStart()
      {
    //--- fill arrays with data
       for(int i=0;i<10;i++)
         {
          int integer=i+10;
          ExtIntArray.Append(integer);
          
          double dbl=i+20.0;
          ExtDblArray.Append(dbl);
          
          CFoo *ptr=new CFoo(i+30);
          ExtPtrArray.Append(ptr);
         }
    //--- output the array contents
       string str="Int:";
       for(i=0;i<10;i++)
          str+=" "+(string)ExtIntArray[i];      
       Print(str);   
       str="Dbl:";
       for(i=0;i<10;i++)
          str+=" "+DoubleToString(ExtDblArray[i],1);
       Print(str);   
       str="Ptr:";
       for(i=0;i<10;i++)
          str+=" "+(string)ExtPtrArray[i].X();      
       Print(str);
    //--- CFoo objects created via new should not be deleted, since they are deleted in the TArrayPtr<CFoo> object destructor  
      }
    Execution result:
    TemplTest EURUSD,M1: Ptr: 30 31 32 33 34 35 36 37 38 39
    TemplTest EURUSD,M1: Dbl: 20.0 21.0 22.0 23.0 24.0 25.0 26.0 27.0 28.0 29.0
    TemplTest EURUSD,M1: Int: 10 11 12 13 14 15 16 17 18 19
  2. Fixed memory reallocation in the ArrayCopy function that could occasionally cause crashes of MQL4 programs.

Tester

  1. Fixed an error that occasionally caused nulling of the variables declared on the global level after testing an indicator.
  2. Fixed testing when connection to a trade server is lost.

MetaEditor

  1.  Fixed defining a function name in MetaAssist in the presence of type casting.
  2. Fixed opening large files.
  3. Added F hotkey to call the search function from the Code Base tab, as well as multiple tips in the status bar for the commands for working with a code: increasing/decreasing indentation, navigation, case shift, etc.


Fixed errors reported in crash logs.
previous123456