How I can write file from a tester to the MQL5/Files folder?

 

Is there a way to copy or move the file created by the tester to the local files or at any location specified?

Kindly, suggested me. I tried to use the FileCopy() function on OnTesterDeInit() function, but didn't got anything.

Please guide me.

 
Not in standard code. You shouldn't want code in test (tester\files) to affect live running code (MQL4\files.)
 
whroeder1:
Not in standard code. You shouldn't want code in test (tester\files) to affect live running code (MQL4\files.)

I have clearly mentioned that I am using MQL5. Why you are telling something related to MQL4?

 

You cannot move/copy files from the sandbox ( \Terminal\Common\Files ) to anywhere outside the sandbox, including MQL5\Files.

Per the documentation:

"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."

The only way to traverse the sandbox barrier is with Windows DLL calls. If that's your need, then there are sufficient examples in past forum posts to show how this is done.

 
Anthony Garot:

You cannot move/copy files from the sandbox ( \Terminal\Common\Files ) to anywhere outside the sandbox, including MQL5\Files.

Per the documentation:

"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."

The only way to traverse the sandbox barrier is with Windows DLL calls. If that's your need, then there are sufficient examples in past forum posts to show how this is done.

Please can you share one reference with MQL5 strictly and not MQL4.

 
  1. jafferwilson: I have clearly mentioned that I am using MQL5. Why you are telling something related to MQL4?
    No difference.

  2. jafferwilson:

    Is there a way to copy or move the file created by the tester to the local files or at any location specified?

    Kindly, suggested me. I tried to use the FileCopy() function on OnTesterDeInit() function, but didn't got anything.

    Please guide me.

    Where did you "clearly mentioned that I am using MQL5?"

  3. jafferwilson: Please can you share one reference with MQL5 strictly and not MQL4.
    Anthony Garot's post was strictly MQL5. You're not going to get much help in the future with your rude attitude.


 
whroeder1:
  1. No difference.

  2. Where did you "clearly mentioned that I am using MQL5?"

  3. Anthony Garot's post was strictly MQL5. You're not going to get much help in the future with your rude attitude.


My apologize if I offended you or any other member. But most of the time I have seen even after saying I am using MT5 or MQl5, still the replies are for MT4 or MQL4. Which is not acceptable.

And for your information if you have read the title ""

How I can write file from a tester to the MQL5/Files folder?

I guess it is enough for stating, right?
 
jafferwilson:

My apologize if I offended you or any other member. But most of the time I have seen even after saying I am using MT5 or MQl5, still the replies are for MT4 or MQL4. Which is not acceptable.

LOL :D, just be glad that people are helping you for free..

jafferwilson:

How I can write file from a tester to the MQL5/Files folder?

I guess it is enough for stating, right?

It is the same for both MQL4 and MQL5 (as mentioned above)..

 
jafferwilson:

My apologize if I offended you or any other member. But most of the time I have seen even after saying I am using MT5 or MQl5, still the replies are for MT4 or MQL4. Which is not acceptable.

And for your information if you have read the title ""

How I can write file from a tester to the MQL5/Files folder?

I guess it is enough for stating, right?

What is not acceptable is your general attitude on this forum. Starting to insult people or being rude when you don't get what you want is a child behaviour and is not welcome on this forum.

This is my last warning.

 

MQL5 is a very powerful language, so a Sandbox is a must-have, thank God MT5/MT4 have one.

You can "bypass" using external DLLs as stated previously, or, as I used in the past another very powerful programming language called AutoIt.

Cheers!

 

I don't know if I guess what You really want, but I've found that is possible to store the results of a genetic optimization if You right click

on the mouse and store the result as an *.xml file in the desired directory. After this You can process the data as You like.

In Excel You may want to find the Win/Drawdown Ratio and order it in descending order. That's only an idea. 

Reason: