Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...