You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Test script on the first version of the algorithm:
For such a simple function, you have overcomplicated the interface. A lot of unnecessary exports, while the necessary things are missing. I cannot understand your code right away, I can imagine how people who are not so good at programming feel.
Now I will think and propose my own version of simplified export and test script operation.
Perhaps the "evolutionary" approach of finding values of the FF equation parameters is not so much for the purpose of improving the efficiency of finding values, but rather for software modelling the process of evolution.
Well, as evolution is represented by scientists...
The approach is very consistent in its conformity to all evolutionary canons...
Proposition:
1. a fitness function takes an array of parameters of type double and returns a number the larger the better the parameters are chosen. The fitness function prototype is as follows:
2. The fitness function has some parameters, which are specified in the FitnessParams structure. A description of the structure is given below:
3. The fitness function and its parameters are protected from external influence and are stored in an independent library..\\Scripts\\\FF\\FF.ex5. The values of the parameters of the fitness function and its algorithm itself are set at the time of compilation by an independent referee and can no longer be changed by anyone.
4. A custom optimization algorithm and a checking script can find parameters of a fitness function. For this purpose file Export.mqh contains necessary prototypes of this function and its parameters. In order to obtain FF parameters, the export function, which is also located in ...\\Scripts\\\FF\\FF.ex5, is used:
void GetFitnessParams(FitnessParams& params);
5. The user optimization algorithm is located in a separate, closed user library..\Scripts\\\FF\\UserFindExtremum.ex5 and is compiled separately, on the user side. The FindExtremum function must be exported to the user library. This function will be called by the checking script. The full prototype of the function is given below:
6. The checking script loads to its address space the library of the fitness function ..\\Scripts\\\FF\\FF.ex5 with its parameters, and the library of the Find Extremum member..\Scripts\\\FF\UserFindExtremum.ex5. After that it calls the FindExtremum member function.
7. after the participant function has been executed, the checking script queries the parameters of the fitness function, which contain the maximum value found by the participant function and the number of calls it took to find that maximum. Based on this data, a report of the participant's result is generated in the form of a table:
The following post will append the necessary files and a usage example
Export.mqh file - a list of available functions and parameter structure common to all participants
FF.mq5 file - example of a fitness function as a library.
TestFF.mq5 file - checking algorithm as a script
UserFindExtremum.mq5 file - custom function for search of an extremum in the form of a library. A random search is used as an example
Export.mqh file - a list of available functions and parameter structure common to all participants
FF.mq5 file - example of a fitness function as a library.
TestFF.mq5 file - checking algorithm as a script
UserFindExtremum.mq5 file - custom function for search of an extremum in the form of a library. A random search is used as an example
For such a simple function, you have overcomplicated the interface. A lot of unnecessary exports, while the necessary things on the contrary are missing. I haven't understood your code at the first attempt, I can imagine what people who are not so good at programming feel.
I will think about it and propose my own version of simplified export and test script.
Why is it not necessary?
What kind of things are missing?
After all, not just to make life as difficult as possible for the participants so I did it all, and not the first day I thought about it all, and not even the second.
Why not the right ones?
Which ones are missing?
After all, not just to make life as difficult as possible for the participants so I did everything, and not the first day I thought about it all, and not even the second.
Andrew, I do not know about others, but personally, I liked the example of Vasily more. No offense. This is just my subjective perception.
To be fair, I propose to put the question about the choice of connection interface (yours or Vasiliy's) to a vote.
What do you think?
Andrew, I don't know about others, but personally, I liked Vasily's example better. No offence. It's just my subjective perception...
To be fair, I propose to put the question of choosing a connection interface (yours or Vasiliy's) to a vote.
What do you think?
Why not the right ones?
Which ones are missing?
It's not just to make life as difficult as possible for the participants that's how I did it, and it wasn't the first day I thought about it, or even the second.
In your example, the task of searching is partially delegated to the checker script. This is incorrect. The checker script should call the search and check the result and nothing else.
Not all FF parameters are available. For example, how to get the parameter step (value 0.1), possible maximum and minimum? It's great, of course, that every user should read this forum and understand that the step turns out to be 0.1, the minimum -10.0 and the maximum +10.0, then enter these constants into his code and hope that the FF function thinks the same way. But this is not the way to do it in a good way.
Many export functions like ServiceFunc1 are only used in specific search algorithms. For example they should not be used in random search. So why should a user library export them? It's enough to separate the testing task from the search task to realize that all this complicated combination of export functions is unnecessary.
There are many more things that make add-ons unnecessary.
What exactly do you like better?