A separate parameter is created, and other values are substituted depending on its value (described in a couple of posts above). Optimization goes only for this parameter
there's also 1 way out of this situation, but it's not easy to implement:
created csv file, in which was the enumeration of only necessary parameters
i read the file in the OnInit, read values from the file and give them to the parameters (read files with the flag Shared access)
optimized only 1 parameter (line number in the csv file)
wrote an algorithm for generating an mqh file from a csv file (similar to the points above, but faster) and connected it to the Expert Advisor.
A separate parameter is created, and other values are substituted depending on its value (described in a couple of posts above). Optimization goes only for this parameter
there's also 1 way out of this situation, but it's not easy to implement:
created csv file, in which was the enumeration of only necessary parameters
i read the file in the OnInit, read values from the file and give them to the parameters (read files with the flag Shared access)
optimized only 1 parameter (line number in the csv file)
wrote an algorithm for generating an mqh file from a csv file (similar to the points above, but faster) and connected it to the Expert Advisor.
And how does this allow you to implement a genetic algorithm, if you have only one variable?
That's an interesting solution. And how, is the genetics going well, not getting bogged down in one offspring?
It's okay. It's not failing. ))) At least not yet. Somewhere I had an owl with a lot of invalid parameters. I'll have to run optimization on it and see.
The idea of porting is that genetics stumbles exactly at initialization. But if check is moved to OnTick , then initialization goes well, test starts, ends immediately and genetics gets result of pass to zero.
It's OK. It's not going down. ))) At least not yet. Somewhere I had an owl with a lot of invalid parameters. I'll have to run optimization on it and see.
The idea of porting lies in the fact that genetics stumbles exactly at initialization. But if check is moved to OnTick , then initialization goes well, test starts and ends right away and genetics obtains zero result.
It's good that it doesn't fail. The essence of the code is clear, but I would add execution only once, especially if there are many conditions for early exit.
It's good that it doesn't get bogged down. The gist of the code is clear, but I would only add execution once, especially if there are many conditions for early exit.
Optimisation on that owl I was talking about is going well. )))
An idea came up to sift out "invalid" parameters during genetic optimization in OnTester():
It turns out that without interfering with genetics the results of INIT_PARAMETERS_INCORRECT may not be seen.
But here we have another question: can we get "deep minus" on profit in this case?
this is a very slow method. We are spending resources calculating the whole pass.
is a very slow method. We're wasting resources on miscalculating the entire aisle.
Of two evils...
is a very slow method. We are wasting resources calculating the whole pass.
EnterINIT_PARAMETERS_INCORRECT_ONTESTER - rollover to OnTester.
How I solved this problem (several variants):
How I solved this problem (several variants):
And how does this allow you to implement a genetic algorithm, if you have only one variable?
It's dawned on me! ))))
From the OnInit lines
moved to.
Genetics does not interfere, andPARAMETERS_INCORRECT is not calculated. )))
It's dawned on me! ))))
From the OnInit lines
moved to.
Genetics does not interfere, andPARAMETERS_INCORRECT is not calculated. )))
Interesting solution. And how, genetics goes successfully, doesn't get bogged down in one descendant?
That's an interesting solution. And how, is the genetics going well, not getting bogged down in one offspring?
It's okay. It's not failing. ))) At least not yet. Somewhere I had an owl with a lot of invalid parameters. I'll have to run optimization on it and see.
The idea of porting is that genetics stumbles exactly at initialization. But if check is moved to OnTick , then initialization goes well, test starts, ends immediately and genetics gets result of pass to zero.
It's OK. It's not going down. ))) At least not yet. Somewhere I had an owl with a lot of invalid parameters. I'll have to run optimization on it and see.
The idea of porting lies in the fact that genetics stumbles exactly at initialization. But if check is moved to OnTick , then initialization goes well, test starts and ends right away and genetics obtains zero result.
It's good that it doesn't fail. The essence of the code is clear, but I would add execution only once, especially if there are many conditions for early exit.
It's good that it doesn't get bogged down. The gist of the code is clear, but I would only add execution once, especially if there are many conditions for early exit.
Optimisation on that owl I was talking about is going well. )))
Good idea. We need to add a check flag.