select count(*) as book_count, cast(avg(parent) as integer) as mean, cast(median(parent) as integer) as median, mode(parent) as mode, percentile_90(parent) as p90, percentile_95(parent) as p95, percentile_99(parent) as p99 from moz_bookmarks;
Documentation has been updated.
void func(int &arr[ ][ ][ ][ ]) { }
struct MyStruct { string Array[]; }; void OnStart() { MyStruct a1,a2; ArrayResize(a1.Array,3); ArrayResize(a2.Array,1); a1=a2; }Earlier, the "a1" array size was equal to 3 after the function call. Now, the size will be 1.
Documentation has been updated.
ENUM_FP_CLASS MathClassify( double value // real number );The enumeration contains the following values:
if(MathClassify(value)>FP_ZERO) { Print("value is not a valid number"); }
We have revised optimization criteria which include two variables, one of which is the balance. Now, the
criteria only take into account the second variable and ignore the
balance. The new optimization criteria are easier to analyze.
Position value and magic columns have also been added to the trading history section.
import sys chart_symbol='unknown' chart_tf=1 if len(sys.argv) == 3: chart_symbol, chart_tf = sys.argv[1:3]; print("Hello world from", chart_symbol, chart_tf) >> Hello world from T.NYSE 15
Search results from external resources appear in the MetaEditor toolbox window:
long DatabaseImport( int database, // database handle received in DatabaseOpen const string table, // table name to insert data to const string filename, // file name to import data from uint flags, // combination of flags const string separator, // data separator ulong skip_rows, // number of first rows to skip const string skip_comments // string of characters, which define comments );
long DatabaseExport( int database, // database handle received in DatabaseOpen const string table_or_sql, // table name or SQL query const string filename, // CSV file name for data export uint flags, // combination of flags const string separator // data separator in the CSV file );
long DatabasePrint( int database, // database handle received in DatabaseOpen const string table_or_sql, // table or SQL query uint flags // combination of flags );
int FileSelectDialog( string caption, // window title string initial_dir, // initial directory string filter, // extension filter uint flags, // combination of flags string& filenames[], // array with file names string default_filename // default file name );The new function enables the efficient user interaction with the MQL5 program.
#property optimization_chart_mode "3d,InpX,InpY"The property allows setting the type of chart which opens at the end of optimization, as well as program parameters for the X and Y axes.
double MathArctan2( double y // the y coordinate of the point double x // the x coordinate of the point );
Added user interface translation into Punjabi (India).
Documentation has been updated.
Fixes based on crash logs.
The update will be available through the Live Update system.
class CFoo { public: struct Item { int x; }; }; //+------------------------------------------------------------------+ class CBar { public: struct Item { int x; }; }; CBar::Item item; // proper declaration of the Item structure from the Bar class Item item; // incorrect declarationAdded namespace support which provides more possibilities when using third-party code/libraries in MQL5 applications.
#define PrintFunctionName() Print(__FUNCTION__) namespace NS { void func() { PrintFunctionName(); } struct C { int x; C() { PrintFunctionName(); }; }; } struct C { int x; C() { PrintFunctionName(); }; }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void func() { PrintFunctionName(); } //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { func(); NS::func(); C c; NS::C ac; }Upon execution the following result is displayed as output:
class A { void operator=(const A &)=delete; // prohibit object copying operator }; class B : public A { }; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { A a1,a2; B b1,b2; a1=a2; b1=b2; }In this example, the compiler will return errors for "a1=a2" and "b1=b2":
input group "Signal" input int ExtBBPeriod =20; // Bollinger Bands period input double ExtBBDeviation =2.0; // deviation input ENUM_TIMEFRAMES ExtSignalTF =PERIOD_M15; // BB timeframe input group "Trend" input int ExtMAPeriod =13; // Moving Average period input ENUM_TIMEFRAMES ExtTrendTF =PERIOD_M15; // MA timeframe input group "ExitRules" input bool ExtUseSL =true; // use StopLoss input int Ext_SL_Points =50; // StopLoss in points input bool ExtUseTP =false; // use TakeProfit input int Ext_TP_Points =100; // TakeProfit in points input bool ExtUseTS =true; // use Trailing Stop input int Ext_TS_Points =30; // Trailing Stop in points input group "MoneyManagement" sinput double ExtInitialLot =0.1; // initial lot value input bool ExtUseAutoLot =true; // automatic lot calculation input group "Auxiliary" sinput int ExtMagicNumber =123456; // EA Magic Number sinput bool ExtDebugMessage=true; // print debug messagesWhen such an Expert Advisor is launched in the Strategy Tester, input parameter blocks can be collapsed or expanded by a double click on the group name, as well as all parameters within a group can be selected for optimization with a single check box.
#import "lib.dll" int func(); #import //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int func() { return(0); } //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { Print( func() ); }In earlier versions, the following error returned during compilation:
'func' - ambiguous call to overloaded function with the same parameters could be one of 2 function(s) int func() int func()Now, instead of the error, the built-in MQL5 function with a higher priority will be used by default. The imported function can be called by explicitly specifying the scope:
void OnStart() { Print( lib::func() ); }
if(condition) { //--- }
// before styling ParameterGetRange("InpX",enable,x_cur,x_start,x_step,x_stop); // after styling ParameterGetRange("InpX", enable, x_cur, x_start, x_step, x_stop);
// before styling if(x==1&y!=2) { int a=0; } // after styling if(x == 1 & y != 2) { int a = 0; }
The user interface has been additionally translated into 18 new languages:
The platform interface is now available in 50 languages, which are spoken by more than 4 billion people.
To set you language for the interface, navigate to the "View / Language" menu at the top of the terminal.
Documentation has been updated.
Fixes based on crash logs.
The update will be available through the Live Update system.
Python is a modern high-level programming language for developing scripts and applications. It contains multiple libraries for machine learning, process automation, as well as data analysis and visualization.
MetaTrader package for Python is designed for efficient and fast obtaining of exchange data via interprocessor communication, directly from the MetaTrader 5 terminal. The data received via this pathway can be further used for statistical calculations and machine learning.
Connection
Functions
bool TesterDeposit( double money // the deposit amount );
Documentation has been updated.
The update is available through the LiveUpdate system.