MetaTrader 5 build 1395: Faster trade operations and visual testing improvements

The client terminal now provides for faster sending of trading commands. Fixed an error which prevented execution of MQL5 applications in terminals

19 August 2016

Terminal

  1. The client terminal now provides for faster sending of trading commands.
  2. Fixed an error which prevented execution of MQL5 applications in terminals running in 32-bit Windows 10, build 1607.
  3. The Navigator now displays whether a trading account is operating in the Hedging or Netting mode.
  4. A new context menu command has been added to the Navigator, it allows to connect to a web terminal using a selected account.
  5. The Help section of the menu has been updated, now it features links to video guides.
  6. Error fixes connected with operation on high-resolution displays (4K).
  7. Fixed errors in Persian translation of the user interface.

MQL5

  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. Added a second version of the TesterInit event handler with the int OnTesterInit(void) signature, which can return INIT_SUCCEEDED (0) or INIT_FAILED (or any non-zero value). If OnTesterInit returns a non-zero value, the optimization will not begin.
  4. Fixed an error, which could lead to different results returned by different ChartGetString overloaded functions.

Tester

  1. Added new commands and hot keys for visual testing. Now it is possible to configure charts in the visual tester like in the terminal: to change colors, to control visibility of various elements, to apply templates, etc.




  2. Fixed operation of the Sleep function in the "Open prices" testing mode.
  3. Fixed formation of incorrect state of bars on timeframes W1 and MN1.

MetaEditor

  1. Added UI translation into Traditional Chinese.

Updated documentation.