Examples: HTML Walkthrough Using MQL4

 

New article HTML Walkthrough Using MQL4 has been published:

HTML is nowadays one of the wide-spread types of documents. MetaTrader 4 Client Terminal allows you to save statements, test and optimization reports as .htm files. It is sometimes necessary to get information from such files in an MQL4 program. The article describes one of variations of how to get the tag structure and contents from HTML.

In terms of a simple description, tag is any word enclosed in angle brackets. For example, this is a tag: <tag>, although, in HTML, tags are certain words typed in Latin letters. For example, <html> is a correct tag, but there is no tag <html2>. Besides, many tags can have additional attributes that precise formatting performed by the given tag. For example, <div align="center"> means tag <div> in which the additional attribute of center alignment of the tag content is specified.

Tags are usually utilized in pairs: there are opening and closing tags. They differ from each other only with the presence of slash. Tag <div> is an opening tag, while tag </div> is a closing one. All data enclosed between the opening and the closing tags is named tag content. It is this content we are interested in at HTML code walkthrough.

Author: MetaQuotes Software Corp.

 

Thanks for an important article

I have one question, can we read HTML file for URL i.e. 'HTML Walkthrough Using MQL4' this page from code?

 
nhasan:

Thanks for an important article

I have one question, can we read HTML file for URL i.e. 'HTML Walkthrough Using MQL4' this page from code?

You can read any local html-file on your PC. How a file is placed on your local directory - this is another question. See also topic MT4 HTTP клиент или не одним MQL писать экспертов...
 
nhasan:

Thanks for an important article

I have one question, can we read HTML file for URL i.e. 'HTML Walkthrough Using MQL4' this page from code?


See Http Client :)

...
string res = httpGET("/en/articles/1544", status);
Print("HTTP:",status[0]," ", res);
Reason: