Jump to content

Recommended Posts

Posted

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;

  • 2 months later...
Posted

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. :-)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...