read this, https://book.mql4.com/functions/files
you open files very often, more then neccesary,
FILE_CSV|FILE_READ - opens existing files only. in read only
FILE_CSV|FILE_WRITE - opens, and if it does'nt exist it creates it, in write only.
FILE_CSV|FILE_WRITE|FILE_READ - opens, and if it does'nt exist it creates it, in write and read.
every time you open a file you must close it, either in function or at deinit(). if you close file in deinit, you might consider fileflush() (if you write to it).
Ohh.. and next time use the "SRC" button
Dear Roger:
Thank you very much for your respond. I am new to file function. Could you please tell me what mistakes I have in my EA or direct me to the right direction.
TIA
int start()
Thank you very much for your help. I will follow your instructions and will see what happens.
read this, https://book.mql4.com/functions/files
you open files very often, more then neccesary,
FILE_CSV|FILE_READ - opens existing files only. in read only
FILE_CSV|FILE_WRITE - opens, and if it does'nt exist it creates it, in write only.
FILE_CSV|FILE_WRITE|FILE_READ - opens, and if it does'nt exist it creates it, in write and read.
every time you open a file you must close it, either in function or at deinit(). if you close file in deinit, you might consider fileflush() (if you write to it).
Ohh.. and next time use the "SRC" button
Thank you very much for your points. Could you please tell me what is SRC and where can I find it?
Thank you very much for your points. Could you please tell me what is SRC and where can I find it?
Thank you.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am trying to Subtract from the Text the word Sell, but, the program below can not read the file. My test.txt is stored inC:\Program Files\MetaTrader\experts\files and it contains this Text: SELL EURUSDPrice=1.32336, Could someone please help.