Jump to ratings and reviews
Rate this book

Expert Advisor Programming for MetaTrader 4. Creating automated trading systems in the MQL4 language

Rate this book
Brand new and fully updated for the latest versions of MetaTrader 4, Expert Advisor Programming for MetaTrader 4 is a practical guide to programming expert advisors in the MQL4 language. Leverage the latest features imported from the MQL5 language, including object-oriented programming, enumerations, structures and more. This book will teach you the following concepts:


The basics of the MQL4 language, including variables and data types, operations, conditional and loop operators, functions, classes and objects, event handlers and more.
Place, modify and close market and pending orders.
Add a stop loss and/or take profit price to an individual order, or to multiple orders.
Close orders individually or by order type.
Get a total of all currently opened orders.
Work with OHLC bar data, and locate basic candlestick patterns.
Find the highest high and lowest low of recent bars.
Work with MetaTrader's built-in indicators, as well as custom indicators.
Add a trailing stop or break even stop feature to an expert advisor.
Use money management and lot size verification techniques.
Add a flexible trading timer to an expert advisor.
Construct several types of trading systems, including trend, counter-trend and breakout systems.
Add alerts, emails, sounds and other notifications.
Add and manipulate chart objects.
Read and write to CSV files.
Construct basic indicators, scripts and libraries.
Learn how to effectively debug your programs, and use the Strategy Tester to test your strategies.
All of the source code in this book is available for download, including an expert advisor framework that allows you to build robust and fully-featured expert advisors with minimal effort.

Whether you're a new trader with limited programming experience, or an experienced programmer who has worked in other languages, Expert Advisor Programming for MetaTrader 4 is the easiest way to get up and running in MQL4.

276 pages, Paperback

First published December 16, 2009

8 people are currently reading
114 people want to read

About the author

Andrew R. Young

7 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (37%)
4 stars
7 (25%)
3 stars
8 (29%)
2 stars
2 (7%)
1 star
0 (0%)
Displaying 1 - 3 of 3 reviews
Profile Image for Vasco.
451 reviews22 followers
April 1, 2019
The bad: Nothing. The only thing that is missing here in my opinion is calculating the rollover value for forex trades with carry, but as this isn't a book on Forex, I don't think I can count that as something that's missing from the book.

The good: An excellent book covering pretty much all uses for Expert Advisors. The examples are simple and the explanations are very good.

The only thing that irritated me slightly is, as a programmer myself, why the author insists on using the for loop condition with <= limit-1 instead of < limit. Aaaargh! But loved the book.
4 reviews
February 22, 2019
Covering the most basic concepts of MQL4. A newbee may benefit from.
Profile Image for Darrin Colegrave.
1 review
February 29, 2012
Easy to read and follow. Not very advanced, with many complex programing functions omitted. Good book for the beginner.
Displaying 1 - 3 of 3 reviews

Can't find what you're looking for?

Get help and learn more about the design.