Have you read in the Reference: "To be able to use the WebRequest function, you must add an URL to the list of allowed URLs in the "Expert Advisors" tab of the "Options" window." ?
Of course. That's what I've written in my previous post.
Yes, I have tried many urls... and nothing works. I'm checking the parameters and I've tried many other things without success...
By the way: I'm working behind a proxy (which is correctly configured in my MT4). Could this be the reason for the problem?
hmm, google for "wininet.dll", InternetOpenW(..) mt4 mql4.
It should give you lots of examples.
Thank so much.
I'll have a look.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi.
I have this piece of code exactly copied as is from MQL4 documentation:
string cookie=NULL,headers;
char post[],result[];
int res;
//--- for working with server you need to add "https://www.google.com/finance"
//--- to the list of the allowed URLs (Main menu->Tools->Options, "Expert Advisors" tab)
string google_url="http://www.google.es";
//--- reset last error
ResetLastError();
//--- load html page from Google Finance
res = WebRequest("GET",google_url,cookie,NULL,50,post,0,result,headers);
//--- check errors
if(res==-1)
{
Print("Error code =",GetLastError());
//--- maybe the URL is not added, show message to add it
MessageBox("Add address '"+google_url+"' in Expert Advisors tab of the Options window","Error",MB_ICONINFORMATION);
}
Why is MT4 returning me an 4051 error code????
Thank you!