Download MetaTrader 5

Examples: HTML Walkthrough Using MQL4

To add comments, please log in or register
They are already making profit from their signals. Publish your signal and join them!
MetaQuotes Software Corp.
Moderator
181059
MetaQuotes Software Corp. 2008.09.22 08:10 

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.

MQL4 Comments
16319
MQL4 Comments 2008.09.24 06:37  

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?

Rosh
93
Rosh 2008.09.24 09:42  
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 писать экспертов...
JDA
585
JDA 2008.09.28 14:01  
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);
To add comments, please log in or register