Discussing the article: "Developing a multi-currency Expert Advisor (Part 24): Adding a new strategy (I)"
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
Check out the new article: Developing a multi-currency Expert Advisor (Part 24): Adding a new strategy (I).
First, let's take some simple strategy and implement it in code for use with our Advisor library. Let's place its code in the project's working folder. Once the strategy is created, a first stage Expert Advisor can be created, which will be used to optimize the parameters of single instances of this trading strategy. Here we will encounter some difficulties associated with the need to separate library and project codes.
We can use practically the same EAs for the second and third stages that were written in the previous part, since the code of their library part does not contain any mention of the classes of trading strategies used. And you will need to add a command to include the new strategy file to the code in the project working folder.
For the new strategy, we will need to make some changes to the project creation EA script in the optimization database. At the very least, the changes will affect the input parameter template for the first stage EA, since the composition of the input parameters in the new trading strategy will differ from that of the previous strategy.
After modifying the project creation EA in the optimization database, we will be able to run it. The optimization database will be created, and the necessary optimization tasks for this project will be added to it. Next, we can run the auto optimization conveyor and wait for it to finish working. This is quite a lengthy process. Its duration depends on the selected optimization time interval (the longer it is, the longer it will take), the complexity of the trading strategy itself (the more complex it is, the longer it will take), and, of course, the number of test agents available for optimization (the more, the faster it will take).
The final step is to run the final EA or test it in the strategy tester to evaluate the optimization results.
Author: Yuriy Bykov