Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Script | HTTP using WinINet directly in mql4

MetaTrader Experts, Indicators, Scripts and Libraries

Author: mapick


This is a "conceptual" script I developed to test the WinINet functions to load a HTTP page directly from mql4

The code imports the wininet.dll original windows library, then it calls all the needed functions, as stated in MSDN documentation, simply translating the mql data types:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa383630(v=vs.85).aspx

You have only to run the script on a chart, and you'll see a MessageBox with the https://www.mql4.com html page

I used this code in one of my EA, to upload a set of signals from my ASP.NET site, calling a page that send the data file

This is the simple C# asp.net page code to send the file:

f (File.Exists(@ "C:\ ... my data directory .... \signs.csv" ))

{

Response.TransmitFile(@"C:\ ... my data directory .... \signs.csv");

Response.Flush();

Response.End();

}

10644

Best MetaTrader Indicators + Profitable Expert Advisors