When using SendFTP() , nothing is returned or printed in the Experts Logo or the Journal,
The Alert(SendFTP()) returns a pop message false
Since you received the statement on your server you should check your server log and also look at the console whilst sending the file, probably it will show the error like connection refused due to incorrect credentials or non existent destination the fact that your server recieves the call indicates that the problem resides on the server side and not the sending indicator so more examination of the logs is needed to be able to find the answer.
I fairly new to servers so please bare with me a little here.
The fact that I received the file when I run a Test under Tools/Options/FTP shouldn't it mean that the connection is working and that the settings are correct?
What is the difference from using the SendFTP () command that prevents if from doing it the same?
I am unable to detect a way to check the Logs of the server when an external client is used to send a file. Can you advise how I can advise how I can do that?
I have Cpanel with a file manager software for uploading files and FTPzila.
The MT4 will print under the logs File Publishing/Ok ,when I run the test , while when I use the SendFTP() nothing gets printed in the MT4 logs.
Thank you
When using SendFTP() , nothing is returned or printed in the Experts Logo or the Journal,
The Alert(SendFTP()) returns a pop message false
So SendFTP() is returning false.
The means there is an error, you need to print the error code with GetLastError(), then check what this error is meaning.
So SendFTP() is returning false.
The means there is an error, you need to print the error code with GetLastError(), then check what this error is meaning.
ScreenShot("screen3.gif",640,480,-1,2,CHART_CANDLE); if (!SendFTP("screen3.gif")); Alert( GetLastError());
Thank you for your support.
I have modified the code as above.
The pop up message returns 4055
From what I see is
ERR_CUSTOM_INDICATOR_ERROR | 4055 | Custom indicator error. |
Thank you for your support.
I have modified the code as above.
The pop up message returns 4055
From what I see is
ERR_CUSTOM_INDICATOR_ERROR | 4055 | Custom indicator error. |
Update
I have used the exact same code but instead of custom indicator I put the code in an EA and it works just fine.
Any reason why this function works with EA while not with custom indicator ?
Thank you
...
ERR_CUSTOM_INDICATOR_ERROR | 4055 | Custom indicator error. |
Ok, wasted a few hours on something so simple :)
I see it works with script. Do you know of a way to have the indicator call a script?
I can have the indicator call the script whenever I want it to ftp the file.
Ok, wasted a few hours on something so simple :)
Sorry, I was thinking to show you how to figure out the problem rather than telling you the answer directly. It's documented here : Functions prohibited in Indicators and Expert Advisors.
I see it works with script. Do you know of a way to have the indicator call a script?
I can have the indicator call the script whenever I want it to ftp the file.
- docs.mql4.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I having difficulty to get the SendFTP command to work on a custom indicator I am writing.
For testing purposes I am just using this code, that should just create a snapshot and FTP it. The snapshot
does get created however it does not get FTP and returns false
Regarding the FTP settings
I have entered successfully my server details in the FTP options
Tools/Options/FTP.
I have also tested it and I did receive the statement file on my server.
Can anyone suggest any reason as to why I can't get it to work.
Thank you