The First Book on MQL4

 

With support from MetaQuotes Software Corp., the first textbook on programming in MQL4 is now ready. You can read the book from the website of https://book.mql4.com/ru/ free of charge.

The book is intended for high readership interested in developing of automated trading programs for MetaTrader 4 Clent Terminal. At the same time, due to new terms introduced in it, the book will be interesting for experienced developers of automated trading systems.

According to the book's author, Sergey Kovalyov, "development of applications for MetaTrader 4 Client Terminal requires the knowledge of MQL4. This present textbook will help you create your own Expert Advisors, scripts and indicators and incarnate in them your ideas - your algorithms of profitable trading."

Nowadays, the advantages of automated trading - day-and-night operation with mass data and full automation of trading - are practically assured. Besides, an automated trading strategy assures the total absence of human factor in trading. For example, the recently conducted Automated Trading Championship 2007 demonstrated the opportunities provided by programming of traders' own strategies. The leader of the Championship increased his initial deposit 13 times within just 3 months! It is how to write your own trading strategy using MQL4 that is the topic of the new textbook.

Considering active interest to automation of trading strategies taken abroad, we are also planning to provide translation of the book into English and into Chinese. As of today, you can translate the book into English using public translating machine.

Table of Contents:

  • Preface
  • Table of Contents
  • Introduction to MQL4
  • Basics of the language
  • MetaEditor
  • Program in MQL4
  • Operators
  • Variables
  • Programming in MQL4
  • Trade Operations
  • Simple Programs in MQL4
  • Standard Functions
  • Creation of a Normal Program
  • About Complex Programs
  • Appendix
 
Lenar:

With support from MetaQuotes Software Corp., the first textbook on programming in MQL4 is now ready. You can read the book from the website of https://book.mql4.com/ru/ free of charge.



Hi there, I have tried to view the book via the google translator, but all that comes up is a blank page. I can view the Russian version but I can't read Russian. ..

Could you please make the book available via a diffreent link, by visiting the English version translation and then copy and pasting those pages to a new html page? Thanks!

Also if you (or whoever the writer is) printed it in a spiral-bound version, you could make some nice conservative profits by selling it on Amazon...;). I would buy it.

Will

 
manningw:

Hi there, I have tried to view the book via the google translator, but all that comes up is a blank page. I can view the Russian version but I can't read Russian. ..

Could you please make the book available via a diffreent link, by visiting the English version translation and then copy and pasting those pages to a new html page? Thanks!

Also if you (or whoever the writer is) printed it in a spiral-bound version, you could make some nice conservative profits by selling it on Amazon...;). I would buy it.

Will



The google translator gives a good results and we can see the pages. Everything is works fine. But also i can recommend you to use AltaVista BabelFish Translator.

We do not have plans to publish the book in a paper. We planned to release the book absolutely free. All right to the book belongs to us and nobody can publish it.
But no we are working on translating the book to English. After that we will release PDF-version of the book, so any one will be able to download it and print on paper. So i think there is no sense in commercial distribution of paper-version of the book.
 
i see a blank page!!!
 

Try putting https://book.mql4.com/ru/ into http://babelfish.altavista.digital.com/, it works.

 
When will you release PDF-version of the book (in english)? I can't wait any longer :)...................
 
Dear MQL4. Community members!

We are glad to inform you that the book by S. Kovalyov is now available on this website.

The translation and proofreading are not fully complete yet, but you can see many sections of the book in English now.

We would also like to ask you to put all your notes and corrections to the book text in this branch. They all will be considered in editing, so we hope that the book will soon be well-readable.

Thank you in advance for your cooperation!
 

I am a just starter for MQL4.

And I am trying to make my EA using 14days MA line but it is too much hard to learn about MQL4 to me.

This is my first try to study programing something with horrible computer language so please let me know where to start. I already know the way how to launch EA on my chart and test. But I just can't understand the language....

 
for(int i=1; i<=OrdersTotal(); i++)

This usage of OrdersTotal() in Expression2 is used in various locations in book as is the second code block below.

Was it the intention to do this as why make call each iteration?

If so, why?

eg, I believe it is usual/less dangerous to not have a [potentially] moving target as loop termination value

=======


if (OrderSelect(i-1,SELECT_BY_POS)==true)

the language works from 0..n-1, so why is 1..n used?

additionally, i -1 is costing extra runtime code, hence extra runtime time

Is this for readability?

If yes, will not readers employ this as their default coding style?

If for no other argument against this style: bars are stored Bars-1..0

so for consistencies sake alone... should not 'the' manual use 0 in all code too? ;)

=======


stringo  2007.06.28 10:28 
 
Incoming tick cannot interrupt EA execution.
 
BTW for closing positions You need to use backward loop
 
for(cnt=OrdersTotal(); cnt>=0; cnt--)

is this high..low pool search method - why used?

is the list a filo / pushdown stack list organization?

if important, is it in the book?



============


Overall great read/reference and place to become inspired - over and over, ...

Thanking Team for efforts :o)

 

Hello,

Is there a way to obtain a printable version of this book ?

Thank you

 
leyoye1:

Hello,

Is there a way to obtain a printable version of this book ?

Thank you


I would love a printable version of the book. Its a total nightmare trying to print from MS Help or for that matter from the website. I tried a few conversion tools but none of them have worked, its a helpful book why is it not accessible and why CHM? I had thought that PDF is the standard?