Download MetaTrader 5
To add comments, please log in or register
Trade like successful traders - subscribe to their signals!
MetaQuotes Software Corp.
Moderator
180316
MetaQuotes Software Corp. 2016.08.16 16:53 

New MetaTrader 4 build 1010: New opportunities of MQL4

MetaTrader 4 platform update is to be released on Thursday, August 18, 2016. The new version features the following changes:

  1. Terminal: Fixed an error which prevented execution of MQL4 applications in terminals running in 32-bit Windows 10, build 1607.
  2. Terminal: Fixed occasional incorrect display of the Search and Chat buttons.
  3. Terminal: Fixed occasional duplicate welcome-emails delivered to the terminal when opening a demo account.
  4. MQL4: 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
      }
    //+------------------------------------------------------------------+
  5. MQL4: 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'
    
  6. MQL4: The CopyXXX function that copies history and tick data has become faster.
  7. MQL4: 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.
  8. MQL4: Fixed occasional incorrect order of graphical objects display after changing the timeframe.
  9. Hosting: 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.
  10. Hosting: You can now synchronize Expert Advisors and custom indicators whose names contain non-Latin characters (e.g. Cyrillic or Chinese characters).
  11. Fixed errors reported in crash logs.

The update will be available through the LiveUpdate system.
Arkadii Zagorulko
17821
Arkadii Zagorulko 2016.08.16 17:19  
Excellent! MT4 - forever!
Panagiotis Stamatiou
2467
Panagiotis Stamatiou 2016.08.20 13:18  
The abstract objects functionality and the string to char array are really useful, thanks!
Mohammad Soubra
23390
Mohammad Soubra 2016.08.20 13:45  
Deos the CSV files able to be hosted to vps?
Rasoul Mojtahedzadeh
26940
Rasoul Mojtahedzadeh 2016.08.28 20:21  
Why backtesting with every tick mode has become very slow in this version? A multi-core version of MT4 would be a great improvement.
91063848
6
91063848 2016.10.12 01:36  


This article allows to find out more about features and limits of Strategy Tester in MetaTrader 4.

Special Features of Testing Strategies on History Data
  • Some functions are processed/passed without output

    These are Sleep(), Alert(), SendMail(), PlaySound(), MessageBox(), WindowFind(), WindowHandle(), WindowIsVisible()

  • Trading is permitted for the symbol under test only, no portfolio testing

    Attempts to trade using another symbol will return error

  • Lot sizes including initial size and increment step, commissions and swaps should be taken from the active account settings

    Before testing, it is necessary to make sure that there is at least one activated account in the list in "Navigator" window of the terminal.

  • All swaps, margin requirements, expirations, GTC-orders are modeled

    Testing is performed maximally closely to trading server conditions. But the can occur some inaccuracies in estimation of margin requirements on cross currencies because of lack of precise information about conversion prices at each moment.

  • Zero bar of another timeframe for the same symbol under test is modeled approximately

    Open = correct Open, Close = correct Close, Low = min (Open,Close), High = max (Open,Close), Volume = final Volume (false)

  • Instant Execution mode is assumed to be used in trades, being processed without slippage
  • Processing orders, Open/Close without slippages
  • Testing stops after StopOut
  • Weekly, monthly, and irregular timeframes are not tested
  • The deposit currency can be changed, but conversion prices are set, and the current available ones are used
  • There are still no delays in execution of trade operations

    A setup delay is planned to be introduced in processing of transactions

  • Account History is fully available, and it does not depend on settings
  • If other symbols and periods are actively used, it is desirable to download them to all possible depth
  • At every-tick modeling, tester pumps all necessary timeframes for the symbol under test independently
  • Using of MarketInfo function generates error ERR_FUNCTION_NOT_ALLOWED_IN_TESTING_MODE(4059), however, correct information about current prices for the symbol under test, about stop level dimensions, about point size, about spread size of any symbol being present in the quotes window is pr
  • Nothing is output in the journal (either Print() function)

    This was done in order to accelerate the testing and save disk space. If complete logs are output the journal files will need hundreds of MByte.

  • Draw objects are not really set

    The objects are disabled in order to accelerate the testing.

  • "Skip useless results" function is used

    In order not to garble the table and chart with testing results, the possibility to skip very bad results is used. This function can be enabled in context menu of "Optimization Results" -> "Skip useless results" tab.

ragl400
6
ragl400 2016.10.18 18:48  

With the new MT4 v1010, how do I load new indicators?

 

Many thanks,

 

Alan 

Sergey Golubev
Moderator
54530
Sergey Golubev 2016.10.18 19:24  
ragl400:

With the new MT4 v1010, how do I load new indicators?

 

Many thanks,

 

Alan 

Which new indicators?

ragl400
6
ragl400 2016.10.18 19:27  
Sergey Golubev:

Which new indicators?

Hello Sergey,

 

As in importing fresh indicators into the platform. 

Sergey Golubev
Moderator
54530
Sergey Golubev 2016.10.18 19:53  
ragl400:

Hello Sergey,

 

As in importing fresh indicators into the platform. 

Just same - open MT4, in menu: File - Open Data Folder - MQL4 - indicators

/
To add comments, please log in or register