Newly updated for hedging accounts, the first guide to programming in MQL5 is here! Expert Advisor Programming for MetaTrader 5 is a practical guide to creating automated trading strategies in the MQL5 language. Take advantage of MetaTrader 5's new features and take your trading to the next level! You'll learn how to program expert advisors quickly and easily using a ready-made framework created by an experienced MQL programmer. This book will teach you the following concepts:
- Learn the basics of MQL5, including variables and data types, operators, functions, event handlers, and object-oriented programming.
- Place, modify and close market and pending orders.
- Calculate, verify and add stop loss and take profit prices to an open position.
- Add a flexible trailing stop and/or break even stop to your strategy.
- Manage your trade risk with money management.
- Use pending orders to scale in and out of positions.
- Use price, time and indicator data in your expert advisors.
- Control program execution by trading on new bar open, and add flexible trade timers to your strategies.
- Walk through the creation of several basic trading strategies from start to finish.
- Inform the user with dialog boxes, email alerts, mobile notifications and sounds.
- Draw trend lines, arrows and text labels on the chart.
- Read and write data to CSV files.
- Learn the basics of creating indicators, scripts and libraries in MetaEditor.
- Debug, test and optimize your trading strategy.
- And much more!
Whether you're an experienced programmer moving from MQL4, or a novice just starting with MQL5, this book will give you the foundation to quickly program fully-featured and robust trading systems. All programs and source code files featured in the book are available for download at the book's official website at http://www.expertadvisorbook.com.