I have tested the standard ExpertMACD Expert Advisor in the strategy tester, which is delivered together with MT5, it generates errors:
2013.03.30 19:18:09 Core 2 genetic pass (0, 15) tested with error "OnInit failed" in 46 ms
2013.03.30 19:18:08 Core 1 genetic pass (0, 13) tested with error "OnInit failed" in 32 ms
2013.03.30 19:18:07 Core 2 genetic pass (0, 5) tested with error "OnInit failed" in 0 ms
I found out by searching that the error is in the module: "SignalMACD" when optimizing Fast and Slow MACD periods (when ticking the boxes in the strategy tester parameters).
Has anyone encountered such a problem and how to deal with it? (when there is only one tick it somehow works, but there are errors as soon as you check two ticks)
Set a different range of changes Slow and Fast. The error will disappear. You can just ignore it.
w1sp: I'm interested in a variable number of parameters like in StringConcatenate. Something like this: string Concatenate(string s, ...); Is it possible?
Similar is possible. Up to 64 parameters can be passed to a function.
Similar is possible. Up to 64 parameters can be passed to a function.
And we can get arbitrary types for all the arguments only by overloading? That is, not only string, but also double can be passed to a function, for example. string s = Concatenate("abc",2.0, "def");
And arbitrary types for all arguments can be achieved only by overloading? That is, not only string, but also double can be passed to the function, for example. string s = Concatenate("abc",2.0, "def");
voidOnStart()
{
//string s1=Foo("5"); // Это теперь ошибка. Компилятор не знаек какой функцией из двух пользоватьсяstring s2=Foo("5",3.0);
// string s=Foo(,"5"); // Ошибка
}
//+------------------------------------------------------------------+string Foo(string i0="", string i1="", string i2="")
{
string rez=i0+i1+i2;
return rez;
}
string Foo(string i0="", double i1=2.0, string i2="")
{
string rez;
if (i1>2.0) {rez=i0+i2;} else rez=i0+"99"+i2;
return rez;
}
Hello. After upgrading the MT5 build, the indicator is no longer displayed normally in the tester, in the terminal itself it is displayed normally. The indicator is quite complex and resource intensive (ZUP), I translate it from MT4 to MT5. In the tester, Bild 756 ZigZag line is displayed normally, in the tester after Bild 770 - ZigZag price values are correct, but the timeframe is not correct (shifted, not evenly) ZigZag - output buffer. At the same time, the graphical objects (triangles, lines, etc., which incidentally are based on output buffers data (ZigZag as well)) are displayed normally. Please help me to understand this.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I have tested the standard ExpertMACD Expert Advisor in the strategy tester, which is delivered together with MT5, it generates errors:
2013.03.30 19:18:09 Core 2 genetic pass (0, 15) tested with error "OnInit failed" in 46 ms
2013.03.30 19:18:08 Core 1 genetic pass (0, 13) tested with error "OnInit failed" in 32 ms
2013.03.30 19:18:07 Core 2 genetic pass (0, 5) tested with error "OnInit failed" in 0 ms
I found out by searching that the error is in the module: "SignalMACD" when optimizing Fast and Slow MACD periods (when ticking the boxes in the strategy tester parameters).
Has anyone encountered such a problem and how to deal with it? (when there is only one tick it somehow works, but there are errors as soon as you check two ticks)
Set a different range of changes Slow and Fast. The error will disappear. You can just ignore it.
Is it possible to write a function with variable number of parameters in MQL5? For example, like in StringConcatenate(...) or Print(...)?
Is it possible to write in MQL5 a function with a variable number of parameters? For example, as in StringConcatenate(...) or Print(...)?
For example, you can make an array whose size will be equal to the number of your parameters as a parameter.
I'm interested in a variable number of parameters like in StringConcatenate. Something like this: string Concatenate(string s, ...); Is it possible?
Similar is possible. Up to 64 parameters can be passed to a function.
Similar is possible. Up to 64 parameters can be passed to a function.
And we can get arbitrary types for all the arguments only by overloading? That is, not only string, but also double can be passed to a function, for example. string s = Concatenate("abc",2.0, "def");
And arbitrary types for all arguments can be achieved only by overloading? That is, not only string, but also double can be passed to the function, for example. string s = Concatenate("abc",2.0, "def");