Stanislav Starikov 2011.12.21 11:43
Use #property tester_file "hello.csv" to transfer your file to tester agent.
You cannot open non-existing file with FILE_READ flag
jianhua296 2011.12.21 17:48
After adding the code #property tester_file "hello.csv" to ea and putting file "hello.csv" into "...\MetaTrader 5\Tester\Agent-127.0.0.1-3000\MQL5\Files" directory before running,the result still give error and delete file automatically!
Use #property tester_file "hello.csv" to transfer your file to tester agent.
You cannot open non-existing file with FILE_READ flag
jianhua296 2011.12.21 17:48
After adding the code #property tester_file "hello.csv" to ea and putting file "hello.csv" into "...\MetaTrader 5\Tester\Agent-127.0.0.1-3000\MQL5\Files" directory before running,the result still give error and delete file automatically!
Documentation on MQL5: File Functions / FileDelete
- www.mql5.com
File Functions / FileDelete - Documentation on MQL5
jianhua296:
Stanislav Starikov 2011.12.21 11:43
Use #property tester_file "hello.csv" to transfer your file to tester agent.
You cannot open non-existing file with FILE_READ flag
jianhua296 2011.12.21 17:48
After adding the code #property tester_file "hello.csv" to ea and putting file "hello.csv" into "...\MetaTrader 5\Tester\Agent-127.0.0.1-3000\MQL5\Files" directory before running,the result still give error and delete file automatically!
Stanislav Starikov 2011.12.21 11:43
Use #property tester_file "hello.csv" to transfer your file to tester agent.
You cannot open non-existing file with FILE_READ flag
jianhua296 2011.12.21 17:48
After adding the code #property tester_file "hello.csv" to ea and putting file "hello.csv" into "...\MetaTrader 5\Tester\Agent-127.0.0.1-3000\MQL5\Files" directory before running,the result still give error and delete file automatically!
Hi Jianhua,
I have had to deal with similar situations. It might do you some good if you could show some of your code so we can better identify the problem...
Problem was solved in the service desk
You can open file with FILE_READ flag if this file exists. If file does not exist you cannot open it
Documentation on MQL5: Standard Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags
- www.mql5.com
Standard Constants, Enumerations and Structures / Input/Output Constants / File Opening Flags - Documentation on MQL5

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Client Terminal Build and Version (32 or 64 bit)
build 555
Problem description
Strategy tester can successfully open file with "FILE_WRITE|FILE_CSV" flag in the "...\MetaTrader 5\Tester\Agent-127.0.0.1-3000\MQL5\Files" directory,but it fail to open file when using "FILE_READ|FILE_CSV" flag and delete this file auto
Sequence of action
...
Obtained result
...
Expected result
...
Additional details
...