I haven't come across it, but it is possible to write... this would be about right for the maximum value of the main masd line over the last 10 bars, not counting the current one:
Small correction
double Hi (int pos=0)
{
int i=pos;
double H=0;
while (i<=pos+10)
{
if (H<iMACD (NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,i))
H=iMACD (NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,i);
i++;
}
return(H);
}
Meaning if I test first test equal to trut, and optimization is not testing - it turns out that if there is optimization, then I do not get to the second condition?! And as a result, the run goes through the full program and not as in test mode....
The trick here is simple. If there is a visualisation, the EA draws objects on the chart and it eats a lot of time. Therefore, we should draw objects during testing with the VISUALIZATION but not without it. But is it the same as optimization!
Meaning if I test first test equal to trut, and optimization is not testing - it turns out that if there is optimization, then I do not get to the second condition?! And as a result, the run goes through the full program and not as in test mode....
The trick here is simple. If there is a visualization, the EA draws objects on the chart and it eats a lot of time. Therefore, we should draw objects during testing with the VISUALIZATION but not without it. But is it the same as optimization!
Objects are not drawn in principle during optimisation.
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 haven't come across it, but it is possible to write... this would be about right for the maximum value of the main masd line over the last 10 bars, not counting the current one:
Small correction
you do not check the value by -1
Bingo!
Much obliged! ))
Small correction.
And how will it differ from my variant, in terms of operability?
p.s. Yeah, by the way, this function doesn't need to be performed on every tick, it's enough when a new bar opens. Serious increase in speed.
And how would it differ from my version, in terms of performance?
Both yours and his are counting 11 bars for some reason, and I need 10.)
Both you and he are counting 11 bars for some reason, but I need 10.)
And how will it differ from my version, in terms of operability?
p.s. Yes, by the way, this function doesn't need to be performed on every tick, it's enough when a new bar opens. A serious increase in speed.
At least because the double H type is used;
If only because the double H type is used;
Testing and optimisation are two different things?
Meaning if I test first test equal to trut, and optimization is not testing - it turns out that if there is optimization, then I do not get to the second condition?! And as a result, the run goes through the full program and not as in test mode....
The trick here is simple. If there is a visualisation, the EA draws objects on the chart and it eats a lot of time. Therefore, we should draw objects during testing with the VISUALIZATION but not without it. But is it the same as optimization!
Testing and optimisation are two different things?
Meaning if I test first test equal to trut, and optimization is not testing - it turns out that if there is optimization, then I do not get to the second condition?! And as a result, the run goes through the full program and not as in test mode....
The trick here is simple. If there is a visualization, the EA draws objects on the chart and it eats a lot of time. Therefore, we should draw objects during testing with the VISUALIZATION but not without it. But is it the same as optimization!
Objects are not drawn in principle during optimisation.