Questions from Beginners MQL4 MT4 MetaTrader 4 - page 82

 
Hello! Can you please tell me how to write code with this condition, if the opening 0 candle is below 70 and the closing candle is in the range of 70 - 80 then open a deal sell how to write tell me!
 
Please explain why the number of passes at the bottom right of the terminal is not reduced when increasing the parameter step in the optimization, i.e. the number is the same as in a more detailed optimization, what could be the reason and the time is the same as in a more detailed optimization in general step does not help to reduce the time for optimization why?
 
MONTE_CRISTO:
Please explain why the increase in the parameter step during optimization the number of passes at the bottom right of the terminal is not reduced, i.e. the number is the same as in a more detailed optimization, what may be the reason and the time is the same as in a more detailed optimization in general step does not help reduce the time for optimization why?

Most likely the reason is the included genetic algorithm in"Strategy Tester -> Expert Advisor Properties -> Testing -> Genetic Algorithm".

 
Sergey Basov:
Most likely, the reason is enabled genetic algorithm in"Strategy Tester -> Expert Advisor Properties -> Testing -> Genetic Algorithm".

How can you optimise without it? How can you disable it?
 
MONTE_CRISTO:

Well, that's right, but how can you optimize without it?

If you disable it, then increasing the step of parameters will have a significant impact on the number of passes and the optimization time. Direct enumeration of parameters because it will.

When optimising with a genetic algorithm, there is not much difference between a million and a billion (for example) initial parameter combinations. The number of passes and optimization time will be approximately the same. The details of the genetic algorithm are available somewhere in the articles at mql5.com.

Try it with genetic algorithm on and off, you will see the difference.

 
Sergey Basov:

If you disable it, then increasing the step of parameters will have a significant impact on the number of passes and optimization time. The direct enumeration of parameters will.

When optimising with a genetic algorithm, there is not much difference between a million and a billion (for example) initial parameter combinations. The number of passes and time will be approximately the same. The details are available somewhere in articles on mql5.com.

Try it with genetic algorithm on and off, you'll see for yourself.


Well I unchecked genetic algorithm and got even more passes and optimization time why?
 
MONTE_CRISTO:

I unchecked genetic algorithm and got even more passes and optimization time why?

So, a lot of parameters are optimized and the step is small, there are too many combinations of parameters for direct search (you can even calculate and compare on calculator). So in this case it's better to use genetic algorithm, it will be faster, though step will not affect time significantly))

Genetic algorithm can be disabled when there are not many parameter combinations, then direct search can be used without genetics to see all results accurately. And then this very step will help reduce time.

In general, the choice is yours, I'm unlikely to tell you anything else useful.

 
Sergey Basov:

So, a lot of parameters are optimized and the step is small, there are too many combinations of parameters for direct search (you can even calculate and compare on calculator). So in this case it's better to use genetic algorithm, it will be faster, though step will not affect time significantly))

Genetic algorithm can be disabled when there are not many parameter combinations, then we can use direct search without genetics to see all results accurately. And then this same step will help reduce time.

In general, the choice is yours, I'm unlikely to tell you anything else useful.


Thanks for the answers, I didn't even know you could do that, it's very helpful info, but how do you speed up optimization with genetic algorithm turned on?
 
MONTE_CRISTO:

i thank you for your replies i dont even know that it is possible to do so very useful info but how to speed up the optimization with gen Algorithm

I have a problem with it in MT4, if I decrease the date range or buy a more powerful computer ))

Or maybe I should use MT5, there is even MQL5 Cloud Network ))
 
Sergey Basov:

In MT4 there is a problem with this, only if you reduce the date range, or buy a more powerful computer ))


Thank you very much for the helpful ideas)
Reason: