Download MetaTrader 5
To add comments, please log in or register
Follow the news. View our company's official channel!
Alessandro Sorvillo
128
Alessandro Sorvillo 2014.05.08 07:58 

Hi guys I'm trying to write an Array to a file using FileWriteArray() but I need to make this file shared writing between 2 or more EA from different brokers.

The fact is: if I use FILE_WRITE everything is ok. But when I use FILE_SHARE_WRITE I don't get my array written (the file remain empty)

P.S. why do I get a 5004 error if the file exist before i attach my EA to the chart?

This is the code I am using:



handle=FileOpen(NomeFile,FILE_BIN|FILE_WRITE|FILE_COMMON);
...
Action[0]=...;
Action[1]=...;
 FileWriteArray(handle,Action);
...
 FileClose(handle);
qjol
3243
qjol 2014.05.08 10:06  
have you tried FILE_READ | FILE_WRITE | FILE_SHARE_READ | FILE_SHARE_WRITE ?
Alessandro Sorvillo
128
Alessandro Sorvillo 2014.05.08 17:22  
qjol:
have you tried FILE_READ | FILE_WRITE | FILE_SHARE_READ | FILE_SHARE_WRITE ?

Well, it worked. Thanks a lot
/
To add comments, please log in or register