cannot open file error 4103

 

Dear profjim,

What are you running at? Are you running an EA in Strategy Tester? Or Just running a script, indicator or EA with the live chart?

bro.

 
brother3th wrote >>

Dear profjim,

What are you running at? Are you running an EA in Strategy Tester? Or Just running a script, indicator or EA with the live chart?

bro.

It is an indicator. Just want to get data calculated in Excel and saved as csv in for the indicator to use.

 
profjim wrote >>

It is an indicator. Just want to get data calculated in Excel and saved as csv in for the indicator to use.

Did you running the indicator while the csv file is opened with Excel. If so, because Excel will lock the file when opening, just close the file in Excel than will be fine.

 
brother3th wrote >>

Did you running the indicator while the csv file is opened with Excel. If so, because Excel will lock the file when opening, just close the file in Excel than will be fine.

Nope. Closed Excel and rebooted. Also checked permissions.

 
profjim wrote >>

Nope. Closed Excel and rebooted. Also checked permissions.

Are you sure the filename is correct? Can you show me the statement of OpenFile() in the indicator script. Thanks.

 
brother3th wrote >>

Are you sure the filename is correct? Can you show me the statement of OpenFile() in the indicator script. Thanks.

Here is the whole prog and the file.

 
profjim wrote >>

Here is the whole prog and the file.

here is the file.

Files:
 
profjim wrote >>

here is the file.

Your script coding showing that

   coefs1=FileOpen("testsemi1.csv",FILE_CSV|FILE_READ,';');
the filename seem didn't match with your attached file, please check is it the problems.
 
brother3th wrote >>

Your script coding showing that

the filename seem didn't match with your attached file, please check is it the problems.

Thanks brother. Got that working. Darn windows explorer doesn't show the extensions. So I had two of them.

Another question: does filereadarray only work with binary files?

 
profjim wrote >>

Thanks brother. Got that working. Darn windows explorer doesn't show the extensions. So I had two of them.

Another question: does filereadarray only work with binary files?

From the mt4 document (ref. https://docs.mql4.com/files/FileReadArray) it said "Reads the specified amount of elements from the binary file into array." It possibly no luck to make it work on text file but you can have a try on it.

Reason: