drbastem Posted October 30, 2009 Report Posted October 30, 2009 int handle=FileOpen("smshaskayafx001.txt", FILE_BIN|FILE_WRITE); if(handle>0) { FileWriteArray(handle, BarOpenValues, 0, 6); // writing last 7 elements FileClose(handle); Sleep(10000); } // FileFlush(handle); Sleep(10000); if (SendFTP("smshaskayafx001.txt")) Alert(" Ok."); Alert(GetLastError()); error code is 4055; Quote
radicaltour Posted January 26, 2010 Report Posted January 26, 2010 Re: Where is the error in the following code? sorry buddy, i think you're trying to call the SendFTP function within a custom indicator....which is not allowed by MQ4. You can read their verbage here: Sends the file to the FTP server set in the Tools->Options->Publisher tab. If the attempt fails, it retuns FALSE. The function does not operate in the testing mode. This function cannot be called from custom indicators, either. The file to be sent must be stored in the terminal_directory\experts\files folder or in its sub-folders. It will not be sent if there is no FTP address and/or access password specified in settings Have you ever wonder why MyFXBook uses an EA instead of an indicator to upload statements to their servers? I guess now we know. :-) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.