MQL5
double matrix::Flat(ulong index) const; // getter void matrix::Flat(ulong index,double value); // setter
计算矩阵元素地址的伪代码:
ulong row=index / mat.Cols(); ulong col=index % mat.Cols(); mat[row,col]
例如,对于'matrix mat(3,3)',访问元素可以按如下写出:
Tester
程序端
程序端
MQL5
VPS
MetaEditor
Tester
>
更新文档。
struct POINT { int x,y; }; int GetYFunc(y) { return(y * y); } void SomeFunction(int x1,int x2,int y) { POINT pt={ x1+x2, GetYFunc(y) }; ProcessPoint(pt); };
struct complex { double real; // 实数部分 double imag; // 虚数部分 };“复数”类型可以作为MQL5函数的参数按值传递(与普通结构不同,普通结构只通过引用传递)。对于从DLL导入的函数,“复数”类型只能通过引用来传递。
complex square(complex c) { return(c*c); } void OnStart() { Print(square(1+2i)); // 常量作为参数传递 } // "(-3,4)"将被输出,这是复数的字符串表示目前,复数只有简单的运算可用:=、+、-、*、/、+=、-=、*=、/=、==、!=。
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;
void func(int &arr[ ][ ][ ][ ]) { }
struct MyStruct { string Array[]; }; void OnStart() { MyStruct a1,a2; ArrayResize(a1.Array,3); ArrayResize(a2.Array,1); a1=a2; }之前,"a1"数组大小在函数调用后等于3。现在,这个数组大小将为1。
文档已更新。
ENUM_FP_CLASS MathClassify( double value // 实数 );该枚举包括以下值:
if(MathClassify(value)>FP_ZERO) { Print("value is not a valid number"); }
我们已修改优化准则,其中包括两个变量,其中一个是结余。现在,该准则仅考虑到第二个变量而忽略了结余。新优化准则更易于分析。
我们收集了来自MetaTrader 5 iOS用户的反馈,并重新设计了应用程序。