New MQL4 Book: Expert Advisor Programming

 
Another one book about MQL is available: Expert Advisor Programming: Creating Automated Trading Systems in MQL for MetaTrader 4 by Andrew R. Young.
Annotation: Finally, the first comprehensive guide to MQL programming is here! Expert Advisor Programming guides you through the process of developing robust automated forex trading systems for the popular MetaTrader 4 platform. In this book, the author draws on several years of experience coding hundreds of expert advisors for retail traders worldwide.

By the time you finish this book, you should possess the knowledge necessary to create your own robust automated trading strategies in MQL, including common trading features such as trailing stops, money management and much more. You will also learn how to construct a simple indicator, using built-in indicator functions.

About the author: Andrew R. Young is a trading system programmer and entrepreneur, and the founder of Easy Expert Forex, an online MQL programming service. He currently resides in Nashville, TN.


You can order the book at amazon.com or at www.createspace.com. Table of Contents and complete source codes are available at expertadvisorbook.com.


  • Chapter 1 is an introduction to MQL4 programming language. Here the concepts of an Expert Advisor, indicator and script are described. Among the topics are the file formats, their location, as well as MetaEditor and basic concepts of MQL language (syntax, comments, identifiers, variables, constants, functions) as well as the preprocessor directives, global variables and MQL programs execution. An example of simple Expert Advisor is provided.

  • The Order details are considered in Chapter 2. The Bid/Ask prices, the spread, the order types and the order placement process are described. The description of OrderSend function, the details about the calculation of Take Profit and Stop Loss prices are presented. The details about retrieving the information about the order and order closing are considered. The trade functions has been added into a simple Expert Advisor.

  • Chapter 3 is about advanced order placement: the order modification, verifying of stops and pending order prices, calculation of lot size are considered. An improved version of an Expert Advisor is presented.

  • Chapter 4 is about the use of the functions. It allows to simplify the code and reuse these function in the other programs. The libraries use is considered here. A simple Expert Advisor that uses these functions is provided.

  • Chapter 5 is about Order Management. The order loops using the operations "for" and "while" are considered. The algorithms for the order counting and stops trailing are presented. These features has been added to the simple Expert Advisor.

  • The practical use of custom and built-in indicators is considered in Chapter 6. The predefined constants of timeframes, the price constants, the smoothing methods and the implementation of trade conditions are presented. The algorithm for the of comparing indicator values across bars problem is presented.

  • Chapter 7 is about working with time and date. The variables of datetime, the typecasting and date and time functions is described An algorithm, that allows to use the date and time trade conditions is presented. The problem of trading once per bar is considered.

  • Chapter 8 is about the tips and tricks. Chart comments, client terminal settings checking, use of the MessageBox function of win32.mqh library are described in detail. Also you will find there an example of e-mail sending, and errors checking in trade operations. The margin and spread checking and two ways of checking of the order profit is presented. The Martingale system is considered. The recommendations about the debugging of the Expert Advisors is presented. The typical compilation errors and their possible reasons are described.

  • The final Chapter 9 is about the Custom Indicators and Scripts and their details. The concepts of buffers and the drawing properties of the indicators are described. An example of simple indicator, that uses built-in functions for the Bollinger Bands calculation is considered. Some important details about the scripts are presented.
Complete source codes of book examples with comments are presented in Appendixes.
 

Hi Rosh,
Thanks. I'm glad to learn about this.
Do you know if they have an electronic version with a search function?
Either way it looks like an excellent investment for a newbe like me.
With MQL5 looming large on the horizon now, the timing is a bit ironic; but better late than never. MQL4 will likely be around and in use for quite some time yet.
How goes the MQL5 Beta testing and development?
I hope you’re not prematurely getting grey hair or losing it over the trials and tribulations of such a formidable task.
Regards

 
MQL5 Beta testing is going as it was planned, you can read some articles on the MQL5 Community - https://www.mql5.com/en/articles
 

Thanks for the invite Rosh, but right now I'm trying to fumble my way through MQL4.
But once I have v4 figured out, I have starting all over again with v5 to look forward too!
I'm glad to hear that is things are going well for you with it though.
It's good that there is someone competent involved in this, because it sure isn't me!

 
PLEASE I HAVE BEEN WORKING VERY HARD TO GET THIS SOFTWARE WORKING ON/placing on
ALL PARABOLIC DOTS, irrespective of TIME FRAMES, CAN YOU PLEASE HELP OUT
WITH ADJUSTMENT OF THE SOFTWARE, SO AS TO BE ABLE SET TP & SL ACCORDINGLY


GAB
Files:
psargbug2.mq4  6 kb
 

(8 >) 'Two Thumbs Up' (< 8)

This is available as hard copy and now an eBook as well now, which unlike the MQ book here, one can search the WHOLE book and not just the book page that one is on which makes this an even better MQL4 learning and resource tool.

Having used the book now for a while I can say that for beginners to MQL4 this is an excellent book. It is very well written in a clear, easy to understand manner. It progresses in a logical manner starting with the very basics for those that are not knowledgeable about any programming at all and then builds on this ever adding to ones knowledge to give one more and more MQL4 capabilities. While it does require some knowledge of the MQL4 trading terminal (and editor), one could learn this in conjunction with MQL4 programming quite readily as one progresses though this book. Their are also a number of functional source code examples that one can download and utilize as very good templates to build ones own programs with. By the end of this book, one will posses an excellent foundation of MQL4 with which one can then progress into ever more complex and powerful programs of one's own.

 
DHAEWOOD:
PLEASE I HAVE BEEN WORKING VERY HARD TO GET THIS SOFTWARE WORKING ON/placing on
ALL PARABOLIC DOTS, irrespective of TIME FRAMES, CAN YOU PLEASE HELP OUT
WITH ADJUSTMENT OF THE SOFTWARE, SO AS TO BE ABLE SET TP & SL ACCORDINGLY


GAB

wtf?? 
 
henlatourrette:

wtf?? 
This is an old post.
Reason: