Yonatan Adarve:
I have been dealing with this EA, but I have not been able to solve this small error (not all control paths return a value)
int Write(string str)
{
//Write log file
int handle;
handle = FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV,"/t");
FileSeek(handle, 0, SEEK_END);
FileWrite(handle," Time " + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS) + ": " + str);
FileClose(handle);
Print(str);
} ------------------------------------- ---------------------------------------
Here I get the error and I can't think what else could it be
int OrdSend(string _symbol, int _cmd, double _volume, double _price, int _slippage, double _stoploss, double _takeprofit, string
_comment="", int _magic=0, datetime _expiration=0, color _arrow_color=CLR_NONE) {
//Send order with retry capabilities and log
int _stoplevel=MarketInfo(_symbol,MODE_STOPLEVEL);
double _priceop=0;
int ticket,err,tries;
tries = 0;
switch (_cmd) {
int Write(string str) { //Write log file int handle; handle = FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV,"/t"); FileSeek(handle, 0, SEEK_END); FileWrite(handle," Time " + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS) + ": " + str); FileClose(handle); Print(str); } ///try this/// void Write(string str) { //Write log file int handle; handle = FileOpen(filename,FILE_READ|FILE_WRITE|FILE_CSV,"/t"); FileSeek(handle, 0, SEEK_END); FileWrite(handle," Time " + TimeToStr(CurTime(),TIME_DATE|TIME_SECONDS) + ": " + str); FileClose(handle); Print(str); }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have been dealing with this EA, but I have not been able to solve this small error (not all control paths return a value)