Course Content
Operation Types
In this section, we will explore the different types of operations available in MQL5. These include arithmetic operations, assignment operations, relation operations, and Boolean operations. We will learn how to perform mathematical calculations, assign values to variables, compare values, and use logical operators. Understanding these operations is essential for manipulating data effectively in MQL5. So, let's dive in and explore the various operations that can be performed in MQL5.
Choice and Loop Operators
In this section, we delve into choice and loop operators, also known as control flow operators. These operators allow us to determine whether or not to execute a specific part of the program, and in some cases, execute it multiple times. Choice operators include if-else, ternary, and switch case, while loop operators include do-while and for. These operators provide flexibility and control in programming, enabling us to make decisions and repeat actions as needed.
In this section, we will explore functions in programming. Functions are code blocks that take input, perform tasks, and may or may not return a value. We will cover the function declaration, definition, and call, as well as the use of predefined functions in MQL5. Functions allow us to control the flow of our program and make it more efficient. Stay tuned to learn how to use functions effectively in your programming journey.
Expert Advisors and Trading Systems
In this section of the course, we will delve into the development of an expert advisor. We will begin by exploring preprocessor directives, which are program properties used for various purposes like parameter setup and information display. Then, we will focus on mql5 event handlers, specific functions that are executed when certain events occur. We will also examine the workflow of a trading system and how it can be implemented within event handlers. Finally, we will introduce the trading system that we will code together throughout this course. Get ready to enhance your understanding of expert advisors and trading systems!
Expert Advisor: General Settings and Bar Opening
In the previous section, we learned about preprocessor directives, mql5 event handlers, and a simple moving average trend following system. In this new section, we will focus on the layout of an expert advisor and how to structure the code within it. We will also discuss system inputs and global variables. Additionally, we will explore the importance of controlling the bar opening for our expert advisor and learn how to do it effectively.
Expert Advisor: Indicators and Trading Signals
In this section of the course, we will be coding the entry and exit signals for our expert advisor. We will learn how to use indicators from MetaTrader 5, specifically the moving average and the bollinger bands. In the previous section, we discussed the layout of the expert advisor, system inputs, and global variables, as well as how to control the bar opening. Now, we will dive into the coding process and explore how these indicators can be utilized to enhance our trading strategy.
Expert Advisor: Order Placement
In the previous section, we learned how to access price and indicator data and coded entry and exit signals for our expert advisor. Now, in this new section, we will focus on sending orders to the market. This involves opening new positions and closing current positions. By doing so, we can actively participate in the market and execute our trading strategies.
Expert Advisor: Position Management
In this section, we will learn about position management options in coding. We will start with the stop loss, which allows us to specify a price to exit a trade at a loss. Then, we will cover the take profit, which is used to collect profits by exiting a trade at a specified price. After coding the functions for calculating stop loss and take profit levels, we will send an order to set these levels in the market. Additionally, we will explore advanced options like trailing stop loss and break even, which are not necessary but can be useful in the future.
Expert Advisor: Changes for Netting Accounts
In this section of the video, the speaker discusses adapting the Expert Advisor to trade under the netting position accounting system. They mention that in the previous section, they coded different position management options and completed the hedging version of the Expert Advisor. Now, they are fulfilling their promise to adapt it for trading under a broker that serves a netting account.
Expert Advisor: Backtesting and Put in Place
In this final section, we will explore include files and their usage, ensure our expert advisor trades as intended, and conduct backtesting and optimization. We will also discuss the necessary MetaTrader 5 setup for algorithmic trading. Lastly, we will examine how our expert advisors function in a demo trading account.
Algorithmic Trading in MQL5: Code Robots & Free Up Your Time
About Lesson

In this video, we explore the essential trading technologies required to develop and trade with trading robots. We begin with MetaTrader 5 (MT5), a versatile trading platform that supports various financial assets like forex, stocks, and futures. MT5 offers advanced features for creating and testing trading robots, surpassing its predecessor, MetaTrader 4. We then delve into MetaQuotes Language 5 (MQL5), the built-in language of MT5, designed specifically for programming trading systems. MQL5 seamlessly integrates with MT5, making it a comprehensive and user-friendly language for developing trading robots. Additionally, we touch upon Metaeditor, the development environment bundled with MetaTrader 5, and MetaQuotes, the company behind these platforms and the programming language.

Join the conversation
0% Complete