- Help me! Why doesn't ea stop?
- Equity ups a fixed percent comparing the starting balance
- Problem with Strategy Tester
I can compile my ea but it doesn't work. I don't know why it don't work. Help me !!!
Hi !
I can not compile the file as the variable "ProfitLevel" is not defined.
And what exactly does not work in your EA ?
Regards, Klaus
Try using FILE_BIN instead of FILE_CSV
int FileHandle_1 = FileOpen(MaximumEquityFileName, FILE_BIN|FILE_WRITE);
int FileWriteDouble( | int handle, double value, int size=DOUBLE_VALUE) |
Returns the actually written bytes count or a negative value if an error occurs.
To get the detailed error information, one has to call the GetLastError() function.
Try using FILE_BIN instead of FILE_CSV
int FileWriteDouble( | int handle, double value, int size=DOUBLE_VALUE) |
Returns the actually written bytes count or a negative value if an error occurs.
To get the detailed error information, one has to call the GetLastError() function.
or u can use FileWrite() & FileReadString() & StrToDouble()
Hi !
I can not compile the file as the variable "ProfitLevel" is not defined.
And what exactly does not work in your EA ?
Regards, Klaus
My EA create a file but it doesn't write account equity into this file.
Bin-files are not thought to be read.
You can use an HEX editor to get an idea of whats inside (values are stored binary, you will find strings in there), but if you want to get a text file which you can open eg. in Excel or with an editor, you must write a CSV file.
But then you can not use FileWriteDouble, only FileWrite is abvailable.
For details check the MQL website, like here: https://book.mql4.com/functions/files
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use