struct complex { double real; // Real part double imag; // Imaginary part };The "complex" type can be passed by value as a parameter for MQL5 functions (in contrast to ordinary structures, which are only passed by reference). For functions imported from DLLs, the "complex" type must be passed only by reference.
complex square(complex c) { return(c*c); } void OnStart() { Print(square(1+2i)); // A constant is passed as a parameter } // "(-3,4)" will be output, which is a string representation of the complex numberOnly simple operations are currently available for complex numbers: =, +, -, *, /, +=, -=, *=, /=, ==,!=.
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.
We have gathered feedback from MetaTrader 5 iOS users and redesigned the application considerably
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
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.