Errors, bugs, questions - page 2435

 
fxsaber:

I'm debugging someone else's code, which is transferring handles from some methods to other functions.

I want to unset a specific handle, which is now used in the stop line - what is the file? And it's really hard to do that.

Unprint the handles at the moment the file is opened(usually in OnInit?)

and then when using a handle, reprint it, then match name = handle

A handle is still a regular number and it doesn't change while the file is open, if I'm not mistaken, file handles have continuous numbering 1,2,3... in order of opening files - haven't checked for a long time

 
Igor Makanu:

unprint the handles when the file is opened(usually in Oninit?)

and then when using a handle, reprint it, then match name = handle

It doesn't work that way. I'm in a function that got a handle out of some wilderness and is going to work with it.

 
fxsaber:

@Slava, I have asked several times to disclose the opt-format, but there has been no response.

Is it possible to disclose the mqd-format? There may be several mqd-files in Files\Tester now, but there is not only no possibility to choose the right one. Sometimes Frame-reading doesn't work if you wait some time after the optimisation is completed.

You don't want to lose important data obtained in an mqd-file during long optimizations. Therefore, opening the mqd-format would greatly help to solve this problem.

Idid not wait for a reply.

Frames
Frames
  • www.mql5.com
Соответствующие методы имеют тот же синтаксис и логику использования, что и соответствующие штатные функции. Пример Сценарии использования Провели Frame-оптимизацию и нужно вернуться к ее результатам. Решили сохранить/передать результат Frame-оптимизации через...
 
fxsaber:

It doesn't work that way. I'm in a function that got a handle from some wilderness and is going to work with it.

Alternatively, define a structure (class)

class CFileAndName{int handle; string name}

and in all f-files functions, replace function description with this class instead of handle.

 
Igor Makanu:

Alternatively, declare a structure (class)

class CFileAndName{int handle; string name}

and in all file operations, replace the function description with this class instead of the handle.

Thank you! Of course, you can always get away with it. But it would be useful to have this functionality.

 

Question.

Do you finish reading the frames in OnTesterDeinit?

 
Slava:

Question.

Do you finish reading the frames in OnTesterDeinit?

I finish most of the time.

 
fxsaber:

Most of the time I finish reading it.

I meant whether there is code for reading out frames in OnTesterDeinit.

Well, there is. Or is it not always there?

 
Slava:

I meant whether there is code to finish reading frames in OnTesterDeinit.

Does it mean that I have it? Or it is not always there?

In practice, I always finished it. When I opened the mqd-format, I didn't even write OnTesterDeinit.

In practice, the frames were always read through while in OnTesterPass. Therefore, OnTesterDeinit has never required to finish reading frames.

 
fxsaber:

In practice, I always finished it. When I opened the mqd-format, I didn't even write OnTesterDeinit.

In practice, we always finish reading frames to the end via while in OnTesterPass. Therefore, we have never needed to finish reading frames in OnTesterDeinit.

You should always finish reading frames in OnTesterDeinit. It's like our Father's Prayer.

People complain later about losing frames.

Reason: