Is there a way I can save the balance curve while optimizing with multicore?

 

I really think you guys have a fast answer to this. I've been searching for this problem in articles for hours but none especifically talks about this


I made a routine that writes the trade result into a .csv file on the OnTester function. 

When I run the optimization using only the first core, all passes are saved properly.

But when I run with multicore enabled I get only the number of passes performed by the first core. 


Is there a way to fix this?


Regards,

 

Hi and good morning,

this is from the MQL5 documentation (Section File Functions)

For security reasons, work with files is strictly controlled in the MQL5 language. Files with which file
operations are conducted using MQL5 means cannot be outside the file sandbox.

I hope, this helps you.

Best regards

 
alemaodoforro:

I really think you guys have a fast answer to this. I've been searching for this problem in articles for hours but none especifically talks about this


I made a routine that writes the trade result into a .csv file on the OnTester function. 

When I run the optimization using only the first core, all passes are saved properly.

But when I run with multicore enabled I get only the number of passes performed by the first core. 


Is there a way to fix this?


Regards,

Yes fixing your code.
 
Te other cores are not in the tester realm, as they don't inherit from OnTester  the way to fix it is to get the file operations  out  of the test function . On tester could set a global flag to be tested by file operations for instance.
 
Carlos Albert Barbero Marcos #:
Te other cores are not in the tester realm, as they don't inherit from OnTester  the way to fix it is to get the file operations  out  of the test function . On tester could set a global flag to be tested by file operations for instance.

Thanks Carlos, I will give it a try

 

It was not obvious to me but each core saves on a diferent folder

Its all there


 
alemaodoforro #:

It was not obvious to me but each core saves on a diferent folder

Its all there


Use common folder.
Reason: