Download MetaTrader 5

File open in strategy tester?

To add comments, please log in or register
Launch your trading signal and add account monitoring!
Daniel Sic
1086
Daniel Sic 2015.07.08 22:22 

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?  

JD4
1101
JD4 2015.07.08 22:28  
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.
Alain Verleyen
Moderator
30752
Alain Verleyen 2015.07.08 22:39  
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.
Daniel Sic
1086
Daniel Sic 2015.07.09 00:17  

Here is some of the code, 


Edit: Working now!

I run in strict mode

Daniel Sic
1086
Daniel Sic 2015.07.09 00:19  
So Strategytester will download it over and over again and fileopen wont open file 
Alain Verleyen
Moderator
30752
Alain Verleyen 2015.07.09 10:50  
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
Daniel Sic
1086
Daniel Sic 2015.07.09 19:49  
Alain Verleyen:

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

 

Thx Sir! Its working now! 

To add comments, please log in or register