File open in strategy tester?

 

Hi, 

I wanted to try my news system in the strategy tester but I get error on the handle when I it comes to FileOpen.. Error code unknow error it say.

Maby it can't open files in the strategy tester?

Also when it checks! IsFileExist it can't find the file but it's there cause it manage to download it

Any suggestions what can be wrong?  

 
I know sometimes how you access a file can cause issues.  Like if you open the file in one spot, and then try to read it (other than a certain way, like read_only) somewhere else in the program, it can cause you issues in your code.
 
slicken:

Hi, 

I wanted to try my news system in the strategy tester but I get error on the handle when I it comes to FileOpen.. Error code unknow error it say.

Maby it can't open files in the strategy tester?

Also when it checks! IsFileExist it can't find the file but it's there cause it manage to download it

Any suggestions what can be wrong?  

Please show the relevant code.
 

Here is some of the code, 


Edit: Working now!

I run in strict mode

 
So Strategytester will download it over and over again and fileopen wont open file 
 
slicken:
So Strategytester will download it over and over again and fileopen wont open file 

You can't open a file in \MQL4\Files with the Strategy Tester. Please check the documentation :

The file is opened in the folder of the client terminal in the subfolder MQL4\files (or Tester\Files in case of testing).

FileOpen - MQL4 Documentation
  • docs.mql4.com
FileOpen - MQL4 Documentation
 
Alain Verleyen:

You can't open a file in \MQL4\Files with the Strategy Tester. Please check the documentation :

 

Thx Sir! Its working now! 

 
Alain Verleyen:

You can't open a file in \MQL4\Files with the Strategy Tester. Please check the documentation :


You've saved my day, thanks!

 
wisenlucky:

You've saved my day, thanks!

Mine too...

Thanks!