Is it possible to work with txt, csv or other files in the testing strategy? If so, how?

Is it possible to work with txt, csv or other files in the testing strategy? If so, how?
Josama Doland:
Is it possible to work with txt, csv or other files in the testing strategy? If so, how?
See:
MQL5 Book: Working with files / Common APIs
MQL5 Book: Working with files / Common APIs
  • www.mql5.com
It is difficult to find a program that does not use data input-output. We already know that MQL programs can receive settings via input variables...

Yes, but only within the tester’s sandbox.

You must use the MQL5\Files (or Tester\Files during testing) directory and standard file functions ( FileOpen , FileRead* , FileWrite* ).
Absolute paths or arbitrary external locations are not allowed in Strategy Tester.

If you need shared access, use FILE_COMMON

One thing to add: the tester doesn't see your normal MQL5\Files folder automatically, because each agent has its own sandbox. Declare the file in the EA and the tester copies it over for you:

#property tester_file "data.csv"

Then just FileOpen("data.csv", ...) as usual. Or put it in the Common\Files folder and open it with FILE_COMMON.