Become an MQL4 Programmer!
If you are a trader looking for ways to make trading simpler and more efficient, you've come to the right place. Leverage technology to your advantage!
If you are a trader-programmer who would like to bring your programming and algorithmic trading skills to the next level, this course is for you. No need to reinvent the wheel!
If you are somebody just looking for a new hobby, try algorithmic trading through this course. There are only so many hobbies where you are compensated for doing something great!
This course is the most intensive, yet straightforward, course for the MQL4 programming language - based on years of experience of an MQL4 programmer.
Probably the fastest way to learn how to build complex trading robots and scripts using the MQL4 programming language, for beginners, non-programmers, and traders!
The course is designed, with the beginner in mind:
By the end of this course, students would be able to independently develop robust and efficient trading robots and scripts based on their own ideas, and expand on their programming knowledge on their own, as an MQL4 programmer!
A short introduction on algorithmic trading and trading robots.
A quick guide on how to enable automated trading on MetaTrader.
Discover an alternative way of describing processes than simply writing down all the details in text. It is useful when describing complex processes that can be seen in scripts and trading robots.
This lesson discusses the basic structure of an expert advisor.
Test your knowledge about expert advisors, scripts, and algorithmic trading (in general).
In this phase, we will learn some of the basics of programming and trading, and how to develop simple trading robots and scripts, based on them.
Here, we will learn one of the most simple expert advisors we can create using MQL4 - a hello world application.
Learn how to code the script version of the hello world expert advisor.
Learn about the basic data types in MQL4 that are used to store information.
Learn about the scope of variables and code blocks in MQL4 programs.
Learn about functions and how they are defined and used in MQL4 programs.
Learn about the various types of orders that can be entered, as well as some of their characteristics.
A short quiz on order characteristics.
Learn about predefined variables and how to use them in MQL4 programs.
Learn the different types of trade operations in Metatrader and MQL4.
Learn how trading robots and scripts enter trades on the market using the OrderSend function.
This video demonstrates the use of the OrderSend function in a script in order to enter a buy market order.
Learn how trading robots and scripts closes orders on the market using the OrderClose function.
This video demonstrates the use of the OrderClose function in order to close a specific order on the market, given the ticket ID of that order.
Learn about arrays in MQL4, and how they are declared and used in MQL4 programs.
Learn about time series, a special type of array, which are used in almost any trading robot.
Learn how to access basic information on the chart (open, high, low, close, and open time of a chart bar).
Learn about the various types of indicators that are used in Metatrader.
Learn about some of the indicator parameters that can often be seen in indicators.
Learn about line indicators, and how expert advisors and scripts can access their output.
Learn about the if-statement, which is the simplest type of condition statement.
Learn how to group multiple conditions in a single if-statement.
Learn about the if-else statement.
Learn about the three types of variables in MQL4 that have global scope - the global variables, the external parameters, and the input parameters.
In this video, we will develop a simple trading robot based on what we learned so far about MQL4 programming.
Congratulations to completing phase one of the course!
Here, we have learned the basics of programming and trading. Our next phases will deal mostly in making our programming easier and more effective, as well as expanding on our knowledge little by little.
This video gives an overview about errors, and how trading robots and scripts can learn about them. It also discusses the most common errors found in trading robots and scripts.
Learn about loops and how they are used in trading robots and scripts.
An in-depth lesson about the management of the entry of orders on the end of a trading robot or script. At the end of the lesson, students would be able to learn about the common pitfalls and preconditions when it comes to sending orders, and how to avoid them.
A short quiz about the recent entry management lesson
Learn about data conversion and typecasting. At the end of this lesson, students would be able to learn how to convert data from one type to another.
This video demonstrates the use of the entry and send_order functions defined in the recent entry management lesson to upgrade the buy order script that was developed earlier in the course.
Learn about order selection, and how trading robots and scripts can be configured to get the information regarding a specific order.
A short quiz about selecting orders.
This video demonstrates the use of loops and order selection to close all active market orders on the platform.
An in-depth lesson about the various preconditions involved when closing an order. At the end of this lesson, students would be able to learn the most common errors that can occur when closing an order, and how to avoid those errors from occurring.
This video demonstrates the knowledge gained from the recent exit management lesson to develop a script that closes all active orders on the trading platform.
A short quiz on the recent exit management lesson.
Learn about pass-by-reference, an alternative way of passing arguments to functions. At the end of this lesson, students would be able to know how to pass huge data more efficiently, or simply allow a local variable to be modified in a function beyond their scope.
A short quiz on the concept of pass-by-reference.
Learn about the methods used in comparing data of double type. At the end of this lesson, students will learn a more efficient way to compare numbers with fractional components.
Learn about order modification. At the end of this lesson, students will learn how trading robots and scripts modify one or more properties of an existing order.
A short quiz about modifying orders.
Learn about constants and enumerations. At the end of this lesson, students will learn alternative ways to store data as encoded on an MQL4 program source code.
Learn about switch statements. At the end of this lesson, students will learn a more efficient alternative to if-else statements (certain limitations apply).
An extension of the first exit management lesson. In this lesson, students will learn a more efficient exit function that would be able to close a greater variety of orders.
In this video, we will apply what we have learned in the recent exit management method to update our previous "close all" script.
Learn an alternative way of counting orders. In this lesson, students will learn how to count the number of orders based on certain criteria.
An in-depth lesson on money management. At the end of this lesson, students will discover the most common money management strategies, and how to implement them in trading robots and scripts.
An extension to the first entry management lesson. At the end of the lesson, students will learn how market execution works and how to code trading robots and scripts that would be able to work seamlessly with brokers that implement market execution.
An in-depth lesson about signal management. At the end of this lesson, students will learn an efficient way to handle entry and exit signals in a trading robot.
An in-depth lesson about the break even level. At the end of this lesson, students will learn how breaking even an order works and how to implement them in trading robots and scripts.
An in-depth lesson about trailing stops. At the end of this lesson, students will learn the various pitfalls and preconditions of implementing a trailing stop loss on orders, and how to deal with them.
Learn about static variables. At the end of this lesson, students would be able to learn how to make a local variable retain its value from one function call to another.
An in-depth lesson about detecting the presence of a new bar on the chart.
An in-depth lesson about implementing a time filter. At the end of this lesson, students would be able to learn a method of determining whether or not a certain time is within a given time range.
An extension of the first signal management lesson. At the end of this lesson, students will learn one method of resolving conflicts that may arise from entry and exit signals.
Learn about virtual stop levels. At the end of this lesson, students will learn about a method of hiding the stop loss and take profit of an order from the broker.
The trading robot template that was used in the simple trading robot upgrade. This template will also be used all throughout the third phase of the course.
This video demonstrates the use concepts learned in this phase of the course, in order to upgrade the first trading robot developed in this course.
Congratulations to completing the second phase of the course!
We have now successfully generated a trading robot template that takes care of up to 99% of the source code when developing trading robots. From now on, most trading robots that we will make will take about around 20 additional lines of code or even less (using the trading robot template). With sufficient experience, you may reach a point where it is already possible to build a trading robot in 5 minutes or even less!
The lessons in this part of the course are pretty intense. Feel free to revisit any lesson within this phase. It is not expected for students to fully understand every lesson within this phase within a very short time frame.
With the trading robot template, you can now develop your own trading robots using mostly the knowledge gained under the first phase of the course. Learning programming takes time and experience, but with our trading robot template, doing so will not slow us down in developing robust trading robots and scripts.
Welcome to the third phase of the course!
If you reached this far, most of difficult lessons in this course are probably over for you! This phase will focus more on the very reason why you took this course - developing trading robots. Here, we will apply what we have learned on all the previous lessons in order to build robust trading robots, along with some finishing touches.
Learn how a trading robot (or script) can be configured to detect a crossover between two chart outputs.
This video is a demonstration of crossover detection in order develop a trading robot that trades based on moving average crossovers.
Learn about histogram indicators.
This video is a demonstration of developing a trading robot based on the output of the awesome oscillator, a histogram indicator.
Learn about indicators with multiple chart outputs, and how to configure a trading robot or script to access their values.
Learn about arrow indicators, and how trading robots and scripts can be configured to access their values.
Learn about custom indicators, and how trading robots and scripts can be configured to access their values through the use of the iCustom function.
Enrico Lambino is self-directed learning enthusiast, programmer and technical writer. He has over 6 years experience in developing expert advisors, scripts, and custom indicators, mostly for the Metatrader 4 trading platform. He believes in the potential of programming in enhancing the performance of traders, making their tasks simpler and more efficient.