Can anyone please explain the strategy tester erasing files that are read from an EA?

 

Hello,


I am having the well known problem of the strategy tester erasing files that I am reading in my EA.  I have read the documentation

and the forums and taken all advice given so far.  When running on a chart, my EA reads from this directory:

C:\Bunchofstuff\MetaQuotes\Terminal\INSTALLID\MQL5\Files\File.csv

When running in the strategy tester, my EA reads form this directory:

C:\Bunchofstuff\MetaQuotes\Tester\INSTALLID\Agent-127.0.0.1-3000\MQL5\Files\File.csv

This line is at the top of my EA code.

#property tester_file "file.csv"

The file still almost always gets erased from the Tester directory.

I say sometimes, because MT5 seems to sometimes run the strategy test without erasing the file.  However, it quickly gets into a weird state

and starts erasing again.  I can sometimes get it to work again by killing and restarting MT5.  This behavior is not reliably reproducable so I am

either missing something or their is a strange bug in MT5 (I know, that's impossible!  ;-)

Anyhow, much appreciate any assistance.

 
File → Open Data Folder and verify you put it in the correct location.
 

Thanks William.  I normally access these locations by going to File/Open Data Folder so I'm quite sure the file is in the locations that I specified above.

What I am not sure of is whether these are the correct locations when one is using the strategy tester and the #property tester_file File directive.

Any help on this appreciated.

 
 
algodevtrader:

Hello,


I am having the well known problem of the strategy tester erasing files that I am reading in my EA.  I have read the documentation

.....

Anyhow, much appreciate any assistance.


There is an older and similar thread here about this:


245022

Open Files during backtest
Open Files during backtest
  • 2018.05.16
  • www.mql5.com
Hello, when i place a file into folder files i can open this file when running or debug my expert...
Reason: