Expert Advisor Programming for MetaTrader 5

A Practical Guide to Learning MQL5

Updated for 2025! The original book for beginners to learn MQL5 programming has been updated with the latest MetaTrader 5 features.

Expert Advisor Programming for MetaTrader 5 is a practical guide to programming expert advisors, indicators and scripts in the MQL5 language.

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.
  • Open, modify and close market and pending orders.
  • 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 the open of a new bar, and add a trade timer to your strategy.
  • 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 and SQLite databases.
  • Learn the basics of creating indicators, scripts and libraries in MetaEditor.
  • Debug, test and optimize your trading strategy.

Whether you’re a trader with little to no programming experience, or an experienced programmer who has worked in other languages, Expert Advisor Programming for MetaTrader 5 will give you the essential knowledge to quickly and easily create fully-featured expert advisors for the MetaTrader 5 platform.

Scroll to Top