Why "FileWrite" can't used in Strategy Tester of MT5

 

We know FileWrite can used in EA and Indicators , But when I use Strategy Tester to output something in file , I find FileWrite can not used.

Anyone used FileWrite in Strategy Tester? Do you find it can't use?

for example:

void OnTick()

  {

    int fileHandle=FileOpen("My.csv",FILE_READ|FILE_WRITE|FILE_CSV);

    FileSeek(fileHandle,0,SEEK_END);

    for(int i=0;i<=10;i++)

       {

         FileWrite(fileHandle,i);

       }

    FileClose(fileHandle);

  }
 
Yu Zhang: We know FileWrite can used in EA and Indicators , But when I use Strategy Tester to output something in file , I find FileWrite can not used.
They certainly can. Are you looking in the correct place (DataFolder\tester\files, not DataFolder\MQL4\Files?)
 
whroeder1:
They certainly can. Are you looking in the correct place (DataFolder\tester\files, not DataFolder\MQL4\Files?)

I used it In MT5. And I also not find Output in Any place, even if I search it.  

(DataFolder\tester\files, and DataFolder\MQL5\Files ) don't find it.

 
Yu Zhang:

I used it In MT5. And I also not find Output in Any place, even if I search it.  

(DataFolder\tester\files, and DataFolder\MQL5\Files ) don't find it.

To know the path, use :

   Print("OUTPUT PATH=",TerminalInfoString(TERMINAL_DATA_PATH));

It's something like :

C:\Users\XXXX\AppData\Roaming\MetaQuotes\Tester\781C3E62F180447B0B09BCE03CD9EA0F\Agent-127.0.0.1-3000\MQL5\Files

Or use FILE_COMMON flag to place your file in an easier path:

C:\Users\XXXX\AppData\Roaming\MetaQuotes\Terminal\Common

 
Alain Verleyen:

To know the path, use :

It's something like :

C:\Users\XXXX\AppData\Roaming\MetaQuotes\Tester\781C3E62F180447B0B09BCE03CD9EA0F\Agent-127.0.0.1-3000\MQL5\Files

Or use FILE_COMMON flag to place your file in an easier path:

C:\Users\XXXX\AppData\Roaming\MetaQuotes\Terminal\Common


thank you, I find it