Terminal
- Added ability to work with tick history in the Market Watch.
Previously, a tick chart showed only the history collected in the terminal
during its operation. Now, you can access the entire tick history on the
trade server. Disable auto scroll and start scrolling a tick chart back in
time using your mouse to download missing history from the trade server the
same way it is done for common price charts. The new feature will be useful
for traders who want to get the most detailed price charts.
Use the CopyTicks() function
to receive deeper tick history. It has been modified so that it requests
missing history and downloads it if the latter is present on the trade server.
- Added an icon for quick opening/closing the Depth of Market.
The icon is located near the One-Click Trading panel on the chart. You can
also use the new hotkey Alt+B. The hotkey also works in the Market
Watch window opening the Depth of Market for a symbol highlighted in the
Market Watch.
- Information about the PC hardware characteristics and the operating
system is now logged to a Journal at the start of the client terminal. Example:
2015.10.14 14:48:18.486 Data Folder: C:\Program Files\MetaTrader 5
2015.10.14 14:48:18.486 Windows 7 Professional (x64 based PC), IE 11.00, UAC, 8 x Intel Core i7 920 @ 2.67GHz, RAM: 8116 / 12277 Mb, HDD: 534262 / 753865 Mb, GMT+03:00
2015.10.14 14:48:18.486 MetaTrader 5 build 1190 started (MetaQuotes Software Corp.)
- Imrpoved working with the symbols in the Market Watch:
- Added display of the amount of symbols in the Market Watch and the
total available amount of symbols on the trade server
- Added a line for adding a new symbol with the smart selection list
- The search in the new symbol line is performed not only by a symbol
name, but also by its description and international name.
- Added support for the economic calendar in different languages.
- Added missing country icons to the economic calendar.
- Added the hotkey for opening the symbol management window in
the Market Watch - Ctrl+U.
- Fixed arranging open chart windows according to the Window menu
commands.
- Fixed an error that occasionally hampered the terminal's ability
to find a certificate file when using the enhanced authentication.
- Fixed an error that could occasionally lead to a price history
synchronization looping.
- Fixed nulling StopLoss/TakeProfit levels of a previously opened
position after its volume has been increased if a symbol is traded in the
Request Execution mode.
- Fixed checking the ability to place a sell order in case of a
long position on symbols in "Long only" trading mode in the Depth of Market.
- Fixed Trailing Stop function operation. In some rare cases, a
protective Stop Loss for an open position was moved incorrectly.
- The terminal interface has been further adapted for high resolution
screens (4K).
- Fixed unloading history data as being excessive despite regular
appeals to it from MQL5 programs.
- Fixed display of some user interface elements when working in
Windows 10.
- Updated translations of the user interface.
Market
- Market: Operation with the product database in the MQL5 Market has been
revised and optimized.
- Market: Purchasing without an MQL5.community account has been disabled
for terminals on VPS. The purchase now requires specification of an MQL5.community
account in the terminal setting: Tools - Options - Community.
- Market: Added direct product purchasing using UnionPay.
- Market: Enhanced logging when purchasing products in MQL5 Market.
- Hosting: Added managing the virtual hosting (except for migration) when
working in the 32-bit version of the client terminal.
Virtual Hosting and Signals
- Payments for Virtual Hosting and Signal subscriptions
can now be transferred straight from payment systems. To pay for hosting services, users don't need to log in to the MQL5.community
account and add money to it. A payment for a service can now be transferred
straight from the platform using one of the available payment systems.
Select one of the available systems and make an online money transfer:
Similarly, a payment for a trading signal subscription can be made straight
from the terminal via a payment system.
The required amount will be transferred to your MQL5.community account first,
from which a payment for the service will be made. Thus, you maintain a clear
and unified history of rented virtual hosting platforms and signal subscriptions
and can easily access and review all your payments for the MQL5.community
services. - Added managing the virtual hosting (except for migration) when working in the 32-bit version of the client terminal.
- Fixed migration of FTP export settings to the virtual hosting
regardless of the permission to publish reports via FTP.
MQL5
- Enabled a new optimizing compiler. Execution of programs has been
accelerated up to 5 times on 64-bit platofrms. MQL5 programs should be re-compiled
in the last MetaEditor version.
- Extended MqlTick structure format. Now, it passes the time of a tick
arrival in milliseconds, as well as flags to determine which tick parameter
has been changed.
struct MqlTick
{
datetime time;
double bid;
double ask;
double last;
ulong volume;
long time_msc;
uint flags;
};
The parameters of each tick are filled in regardless of whether there are
changes compared to the previous tick. Thus, it is possible to find out a
correct price for any moment in the past without the need to search for previous
values at the tick history. For example, even if only a Bid price changes
during a tick arrival, the structure still contains other parameters as well,
including the previous Ask price, volume, etc. You can analyze the tick flags
to find out what data have been changed exactly:
- TICK_FLAG_BID - a tick has changed a Bid price
- TICK_FLAG_ASK - a tick has changed an Ask price
- TICK_FLAG_LAST - a tick has changed the last deal price
- TICK_FLAG_VOLUME - a tick has changed a volume
- TICK_FLAG_BUY - a tick is a result of a buy deal
- TICK_FLAG_SELL - a tick is a result of a sell deal
The MqlTick structure is used in two methods:
- CopyTicks - method does not support the old format of the structure.
Previously compiled EX5 files using the old tick format will return the
error 4006 (ERR_MQL_INVALID_ARRAY) when calling the CopyTicks function.
- SymbolInfoTick - method supports both old and new structure format.
- 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.
Example of use:
#property copyright "Copyright 2015, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
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<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];
}
};
class CFoo
{
int m_x;
public:
CFoo(int x):m_x(x) { }
int X(void) const { return(m_x); }
};
TArray<int> ExtIntArray;
TArray<double> ExtDblArray;
TArrayPtr<CFoo> ExtPtrArray;
void OnStart()
{
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);
}
string str="Int:";
for(int i=0;i<10;i++)
str+=" "+(string)ExtIntArray[i];
Print(str);
str="Dbl:";
for(int i=0;i<10;i++)
str+=" "+DoubleToString(ExtDblArray[i],1);
Print(str);
str="Ptr:";
for(int i=0;i<10;i++)
str+=" "+(string)ExtPtrArray[i].X();
Print(str);
}
Execution result:
TemplTest (EURUSD,H1) Int: 10 11 12 13
14 15 16 17 18 19
TemplTest (EURUSD,H1) Dbl: 20.0 21.0 22.0 23.0 24.0 25.0
26.0 27.0 28.0 29.0
TemplTest (EURUSD,H1) Ptr: 30 31 32 33 34 35 36 37 38
39
- New operations * and & for receiving a variable by reference
and receiving a reference to a variable.
- Added the overloaded form of the ObjectsDeleteAll function - delete
all objects of a specified type by a name prefix in a chart subwindow.
int ObjectsDeleteAll(
long chart_id,
const string prefix,
int sub_window=-1,
int object_type=-1
);
- Fixed the ObjectGetValueByTime function operation. Previously, an
incorrect price value by a chart time could sometimes be returned (for example,
for a horizontal trend line).
- Fixed operation of the Copy* functions in the absence of historical
data on the server. Previously, such cases caused delays of 30-50 seconds
before returning control.
- Added a few improvements to the MQL5 Standard Library.
- Translated the Standard
Library documentation into German, French, Chinese, Turkish, Spanish
and Portuguese.
- Added MQL5
documentation in Japanese.
Tester
- The process of selecting programs to run in the Strategy Tester
has become much easier. The list is displayed now as a tree in accordance
with the directories in which Expert Advisors and indicators are stored.
- Brought display of some indicators during a visualized test in
line with the client terminal.
- Fixed setting a leverage and a chart timeframe while debugging
MQL5 programs via the strategy tester.
- Fixed debugging indicators when testing on history.
Fixed errors reported in crash logs.
Updated documentation.
See the previous news, please: