Quote:
Originally Posted by Michel
I dont know your purpose, but I think you have to implement your script as a a librairy (.mqh) and "include" it in your EA. But maybe the most simple is just to copy your script as a function in your EA.
|
bool SendFTP( string filename, string ftp_path=NULL)
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.
When SendFTP in custom indicators, it's can't work, but can in scripts.
I tried your method, put my function into a .mph file, and save it into experts\include, it result error No. 4055.
TestFTPInc.mqh
int FTPTest()
{
SendFTP("shots\\" + Symbol() + "_5m_live.gif", NULL);
Alert(GetLastError());
return(0);
}
In my custom indicators, I call it like
if (IsNewBar())
{
WindowScreenShot("shots\\" + Symbol() + "_5m_live.gif", 640, 480);
FTPTest();
}
it result error No. 4055.
Thanks a lot. Have a happy weekend.