File Functions

 

How can Add data to a closed CSV file, without deleting it's last writed Data?

i use: int handle = FileOpen(FileName,FILE_CSV|FILE_WRITE,";"); but this syntax delete file data

 
intelligent_14:
How can Add data to a closed CSV file, without deleting it's last writed Data? i use: int handle = FileOpen(FileName,FILE_CSV|FILE_WRITE,";"); but this syntax delete file data

Try adding the FILE_READ statment to it as in:

int handle = FileOpen( FileName, FILE_CSV | FILE_READ | FILE_WRITE, ";" );

CockeyedCowboy

 
cockeyedcowboy:
Try adding the FILE_READ statment to it as in:

int handle = FileOpen( FileName, FILE_CSV | FILE_READ | FILE_WRITE, ";" );

CockeyedCowboy

I have already tested it, but this syntax cause same result

 

anyone know if you can import settings from a file and assign them to a var in an expert?

 
lowphat:
anyone know if you can import settings from a file and assign them to a var in an expert?

of course, you can use FileOpen(FileName,FILE_CSV|FILE_WRITE,";"); for prewrited file then use related reading syntax such as FileReadArray,FileReadString, ....

 

I believe Period_Converter_Opt.mq4 writes a new line for every time it converts. it runs as ind not scrpt

Link1

Link2

or see attachment

Files:
 
lowphat:
I believe Period_Converter_Opt.mq4 writes a new line for every time it converts. it runs as ind not scrpt

thank you very much lowphat, the file that you have attached was so usefull, this program, use FileTell Syntax to find pointer position, and then use the FileSeek to Set the pointer position of file, so the new data can be writen right after the last ones

Reason: