Anatoli Kazharski: Add to dynamic array as it is and then sort at the end of optimisation.
I.e. to make an additional two-dimensional array, where to put the number of the passage and indicators for it?
And if you write to a file at once? I.e. is it possible to do this - forget by zeros the lines without value, and then when the value appears, overwrite them?
Well, Anatoly has correctly pointed out to you. Collect the results into a list or dynamic array (I like the list better) during the optimisation process, in the body of the OnTesterPass() handler. And at the end of the optimisation, in the body of the OnTesterDeinit() handler, sort the list/array by the required criterion and save it.
Well, Anatoly has correctly pointed out to you. Collect the results into a list or dynamic array (I like the list better) during the optimisation, in the body of the OnTesterPass() handler. And at the end of the optimisation, in the body of the OnTesterDeinit() handler, sort the list/array by the required criterion and save it.
I didn't see something about the list, what do you mean?
I didn't see something about a list, what do you mean?
I mean that there is such a data type - CList - a list. It is convenient to collect the results in your task. But the results should be wrapped in the node type - it is a descendant of CObject.
I mean that there is such a data type - CList - a list. It is convenient to collect results in it in your task. But the results should be wrapped in the node type beforehand - it is a descendant of CObject.
I see - I took a look and realised that there are a lot of complexities there - you need to understand it if you want to use it... and I found some complicated examples. Can you show me how to do it on the example of this particular task?
When testing in the entry point optimisation mode, I need to output information about the percentage of winning/loss trades into a file.
It seems to be a trivial task, but I struggled for 2 days, then took offence at methaquot and forgot about it for a fortnight.
Today, swearing at the methaquots (they have implemented the OnTester and OnTesterPass functions in a strange way, but they also failed to mention in the reference book that these functions need FrameAdd and FrameNext to be "initialised", otherwise they work like hell). ), with a glance at your example I finished writing what I needed))))
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Not planning to revisit this topic anytime soon.
Try to formulate your problem more precisely and post here. Perhaps someone will suggest a solution.
My task is simple - to record passes by sequence number, not in the sequence of optimisation results.
My task is simple - to record passes by sequence number, not in the sequence of optimisation results.
Add to dynamic array as it is and then sort at the end of optimisation.
I.e. to make an additional two-dimensional array, where to put the number of the passage and indicators for it?
And if you write to a file at once? I.e. is it possible to do this - forget by zeros the lines without value, and then when the value appears, overwrite them?
Record it where?
To a file, of course.
In the file, of course.
Well, Anatoly has correctly pointed out to you. Collect the results into a list or dynamic array (I like the list better) during the optimisation process, in the body of the OnTesterPass() handler. And at the end of the optimisation, in the body of the OnTesterDeinit() handler, sort the list/array by the required criterion and save it.
Well, Anatoly has correctly pointed out to you. Collect the results into a list or dynamic array (I like the list better) during the optimisation, in the body of the OnTesterPass() handler. And at the end of the optimisation, in the body of the OnTesterDeinit() handler, sort the list/array by the required criterion and save it.
I didn't see something about the list, what do you mean?
I didn't see something about a list, what do you mean?
I mean that there is such a data type - CList - a list. It is convenient to collect the results in your task. But the results should be wrapped in the node type - it is a descendant of CObject.
I mean that there is such a data type - CList - a list. It is convenient to collect results in it in your task. But the results should be wrapped in the node type beforehand - it is a descendant of CObject.
I see - I took a look and realised that there are a lot of complexities there - you need to understand it if you want to use it... and I found some complicated examples. Can you show me how to do it on the example of this particular task?
Thank you very much, Anatoly!
When testing in the entry point optimisation mode, I need to output information about the percentage of winning/loss trades into a file.
It seems to be a trivial task, but I struggled for 2 days, then took offence at methaquot and forgot about it for a fortnight.
Today, swearing at the methaquots (they have implemented the OnTester and OnTesterPass functions in a strange way, but they also failed to mention in the reference book that these functions need FrameAdd and FrameNext to be "initialised", otherwise they work like hell). ), with a glance at your example I finished writing what I needed))))