In this course you will learn how to code with object-oriented programming, how to adapt our simple expert advisor to a new framework and how to work with pending orders.
Introduction to MQL5 Object-Oriented Programming (OOP)
In the first part we will focus on how to code object-oriented programming in MQL5. We will cover the theory while maintaining a practical approach.
First, we will introduce you to object-oriented programming, covering classes and objects, and then we will explain MQL5 OOP main concepts, such as encapsulation, inheritance or polymorphism, both in theory and code and with examples.
New MQL5 OOP Framework for the Expert Advisor
In the second part we will take the expert advisor that we built in the previous course, “Algorithmic Trading In MQL5: Code Robots & Free Up Your Time” and we will rebuild that robot with classes and objects of our own.
During this part we will create a new framework for our expert advisor where we rearrange the code and encapsulate it within different header files that will form our framework. Framework v2.0 uses a custom Trade class to send the orders, v2.1 uses MetaQuotes library class.
In case that you did not complete the previous course, you will have available for download a copy of that expert advisor in this course, so you can follow along with the lectures.
MQL5 Pending Orders
We will cover everything about pending orders and we will create a version of our robot that trades with them.
Here you will learn what type of pending orders we can use in Metatrader 5, how to place them, how to modify and delete them and how to set their expiration time. In short, you will learn how to trade algorithmicly with any pending order:
- – How to send, modify and cancel buy limit and sell limit pending orders
- – How to send, modify and cancel buy stop and sell stop pending orders
- – How to send, modify and cancel buy stop limit and sell stop limit pending orders
I am confident that you will find great value on all the knowledge and techniques shared in this course.
If you like the program and if you are interested on improving your MQL5 skills and your trading robots, then wait no more! This course is for you!
After this course, you will have a better framework for your expert advisor and you will be able to bring your MQL5 skills to a level that will allow you to follow-up with any of our advanced courses.
The different expert advisors and files coded during the course are provided to you with the course.
– Jose Martinez
What Will You Learn?
- How to code from an object-oriented programming approach
- How to code classes and objects and implement them in an expert advisor
- How to send, modify, set expiration and cancel pending orders
- How to connect your trading to a VPS
Starting Point (ii): Review of the Simple Moving Average EA Code05:09