Expert Advisor Programming for MetaTrader 5
Creating Automated Trading Systems in the MQL5 Language - Second Edition
- 338 stránek
- 12 hodin čtení
Newly updated for hedging accounts, this practical guide to programming in MQL5 focuses on creating automated trading strategies. Leverage the new features of MetaTrader 5 to enhance your trading! Learn to program expert advisors quickly using a framework developed by an experienced MQL programmer. Key concepts include the basics of MQL5, such as variables, data types, operators, functions, event handlers, and object-oriented programming. You'll discover how to place, modify, and close market and pending orders, calculate and manage stop loss and take profit prices, and implement flexible trailing stops. The guide covers trade risk management, using pending orders for position scaling, and integrating price, time, and indicator data into your strategies. Control program execution based on new bar openings and add trade timers. Step through the creation of several basic trading strategies, and learn to inform users through dialog boxes, email alerts, mobile notifications, and sounds. You'll also find instructions for drawing trend lines, arrows, and text labels on charts, reading and writing data to CSV files, and basics of creating indicators, scripts, and libraries in MetaEditor. Debugging, testing, and optimizing your trading strategy are also covered. Whether transitioning from MQL4 or starting fresh, this guide provides a solid foundation for programming robust trading systems. All programs and source code files are availa

