Forum

filewrite(), fileread(), confused

Hi, I am trying to write some filewrite() and fileread() codes. filewrite() like this: int Open_Filing () { Handle_Open = FileOpen ( " open.csv " , FILE_CSV | FILE_READ , ';' ) ; if ( Handle_Open < 0 ) { Handle_Open = FileOpen ( " open.csv " , FILE_CSV | FILE_WRITE , ';' ) ;

"too many opened files" error

Hi, Please help me to find out why these codes get "too many opened files " error. ... for ( Counter = 0 ; Counter < OrdersTotal () ; Counter ++ ) { OrderSelect ( Counter , SELECT_BY_POS , MODE_TRADES ) ; if ( OrderOpenTime () > New_Order_Time ) { New_Order_Time = OrderOpenTime

How to share files in different paths?

Hi, Accronding to MQL4 rules: files can only be opened in the terminal_directory\experts\files folder or in its subfolders. I am trying to write some EAs. And they need to share files between different terminals. for example, EA-A in FXDD\experts and EA-B in Interbank\experts. EA-A saved some files

Will fileread and filewrite hurt harddisk?

Hi, I remember someone here said he had an EA can follow other EAs actions. A slave EA will read the account, filewrite a file in disk and another master EA will fileread this file, pick up the symbol, open price , SL, TP, etc. then ordersend... I'm just wondering if the master EA fileread the file

StringSubstr()'s limit

Is there any limit in this "string StringSubstr ( string text, int start, int length=0)"? I read the documentation, but no answer. "length=0" means I can extract starting from the given position and up to the end of the string. But when I do so, it always cut the tail of the string, the maximum

How to automatically calculate risk level and order lots?

Hello, experts, I am a brand new EA learner. I am thinking how to write a small EA to automatically calculate risk level and order lots. Let's say I have opened 10 charts. At some certain time, for example 0:00 Monday, while some entry signals=true, before opening orders, I want the EA check and

How to export and print a statement on MT4?

Hi, I am a 100% newbie, I have searched the MT4 but can not find a button to view any statement, would you please help me? Many thanks