Discussing the article: "Developing a multi-currency Expert Advisor (Part 13): Automating the second stage — selection into groups" - page 2
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
Yuri, good afternoon! I managed to run the optimisation of the second stage and it passed. But during the optimisation such errors are constantly in the log:
And in the end, as I realised, nothing was added to the database.... The only thing in the tasks database changed the status of the tasks of the second stage and the time of their execution.
What does this error mean and where to dig? Where should the information about the passes be recorded and should it be recorded at all? If it should be written as passes or at the end of the whole stage in one transaction all in the database?
Hello Victor.
I have not observed this, so it is indeed an error. Judging by this line of the log:
I can assume that in your main database the passes table has been replaced by the one that should have been created only in the second database. That is, this table now has 2 columns instead of 48.
I dealt with this issue and ran the second stage. Passages in the main base were added. But a new problem appeared... Now with the third Expert Advisor. For some reason, it does not take the passes that you specify in the list, but takes the first ones from the beginning from the passes table. And now there is an assumption that the EA of the second stage worked the same way and the whole optimisation is wrong. I don't understand how to solve it yet.
According to your idea, where should the task database be created, in the Common\Files folder or in the MQL5\Files folder of the terminal?
The third Expert Advisor is also sorted out, it seems to work as it should. Thank you for the Expert Advisor and this series of articles.
PS: I noticed such a moment, it is certainly not a problem, but still, - when testing in visual mode in the tester, the Expert Advisor opens a lot of separate orders, often by 0.01 lot. As I understand it, each virtual strategy opens its own positions. But if you look at the scheme from the 3rd article, then according to the last scheme it should open one position on each trading instrument and just adjust the volume depending on the total lot and direction of all open virtual positions. It is like working on a netting account. Maybe it's just a glitch in the tester or it's just the way positions are displayed there.... Yuri, is it possible to enable the EA to work on the hage account as if on a netting account and have only one position in the market for each trading instrument?
Yuri hello. I am now optimising the second stage, and in the log I occasionally get a database occupancy error:
The Expert Advisor is original, from the article. I am optimising on local agents of a PC and on the local network on agents of another PC. In general, the process is going on and passes to the database are filled, but I would like to understand what causes this error, and how to fix it?
It also happens that some tasks of the second stage finish very quickly. For example:
Here for example NZDCAD H1 M30 and NZDCHF H1 ended literally in one pass of the optimiser as I understand. Although there are many passes of the first stage for them in the database. Why does this happen and what can be done about it?
And NZDCAD M15 gave an error at all. As I understand it does not find data in the database, but how is this possible? After all, at the first stage of optimisation of these pairs was and passes should be in the database....
Yuri, is it possible to do this for example: I have conducted the first and the second stage and saved everything in one database. And it is possible then (after the second stage) to change, in the database, the status of tasks of the first stage for those pairs and tf on which the second stage gave bad results, so that for these pairs and tf as if on top of the second stage to add passes of the first stage, and then for them to carry out again the second stage? Simply at such action id of new passes of the first stage will be higher than id of passes of the second stage for all other pairs in this base. I mean the table passes. Is it possible to do so, and will the optimiser find passes of the first stage for these pairs and tf?
A database is open and locked somewhere. It can also be an external application in relation to the tester, for example, MetaEditor. I don't remember encountering anything like this.
It does indicate that the first stage passes for NZDCAD M15 have not been found for some reason.
Yes, you can do this as many times as you want. If you want the old passes from the previous first stages not to remain, you can delete them from the passes table by the required id_task.