Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 593

 

Another question, how well does the tester work with EAs that copy data from multiple TFs?

If correct, which TF to choose when testing does it matter?

 
Juer:

An out of memory error pops up when running a test (won't start). How to fix it?

After restarting the terminal, testing starts, and then after several tests again out of memory.

Reduce the number of visible and bars in the history (but in this case the deep quotes history will disappear, so you decide what is more important). It is also possible that too many charts are opened in the terminal. Sometimes a user opens about 50 charts with 1 million bars of history. No memory is enough in this case.

 
Artyom Trishkin:

This is where they will be able to answer exactly.

There are several tens of thousands of lines in the code. In logs errors only after testing xxx undeleted objects left. I can run about 9 tests on average and then error out of memory.

 
Ihor Herasko:

Reduce the number of visible and bars in the history (only in this case the deep quotes history will disappear, so you decide what is more important). It is also possible that too many charts are open in the terminal. Sometimes a user opens about 50 charts with 1 million bars of history. No memory is enough in this case.

No, it does not help or affect anything. I am testing with one chart and reducing history to the minimum. I repeat, it can be tested, but only a limited number of times. On about the 10th test, an out of memory error pops up.

 
Juer:

There are several tens of thousands of lines in the code. In logs errors only after testing xxx undeleted objects left. On average I can run 9 tests and then error out of memory.

These are all memory leaks. They need to be eliminated by freeing the memory allocated to each of the objects via the delete command.

 
Ihor Herasko:

These are all memory leaks. They must be eliminated by freeing up the memory allocated to each of the objects via the delete command.

To clarify: delete all objects in OnDeinit() - graphical, class objects if any...

 
Artyom Trishkin:

To clarify: delete all objects in OnDeinit() - graphical, class objects if any...

How do I delete them there if they're not visible...

I have a collection of objects (class inherited from CArrayObj), they in turn are added to a list of similar objects, and those to the final object (also inherited from CArrayObj), which is already visible at global level and which I delete in OnDeinit... And I don't delete those when I delete them, I need them while the program is running.

 
Juer:

How do I delete them there if they're not visible...

I have a collection of objects (class inherited from CArrayObj), they in turn are added to a list of similar objects, and those to the final object (also inherited from CArrayObj), which is already visible at global level and which I delete in OnDeinit... And I don't delete those when I delete them, I need them while the program is running.

It doesn't happen that the objects you create are invisible.

They can be inaccessible from one function or another, but they must be accessible in the object itself. This is the object where you need to clear the memory. This is usually done with the class destructor. To make sure, put Prints in all destructors and in OnDeinit.

 
Please, who knows, tell me how to determine if there is an OCT panel on the graph
 
Stanislav Dray:
Please, who knows, tell me how to identify the presence of an OCT panel on a graph

What is an OCT panel?