Algorithmic Trading In MQL5: Code Robots & Free Up Your Time

The Algorithmic Trading In MQL5 course will teach you how to code a trading robot from scratch in the MQL5 programming language.

The trading robot (expert advisor) is provided with the course.

You will learn:

  • How to build a completely automated trading robot that can trade different markets (Forex, CFDs of cryptocurrencies, indices, stocks…)

  • A well-known popular trading system

  • How to send orders and modify and close positions
  • How to code in the most popular language for trading in the financial markets (MQL5)
  • How to read and interpret the markets with algorithms

  • How to backtest and optimize trading robots in Metatrader 5

  • How to connect your trading to a VPS
Algorithmic Trading MQL5 Course

This course includes:

  • 9.5 hours
  • 2 articles
  • 4 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of completion

MQL5 Course Description

In this course you will learn how to completely automate your trading coding a trading robot (expert advisor) in MQL5, which is the MT5 programming language. We will develop an expert advisor from scratch that can trade on different financial markets, such as forex, crypto, stocks, indices, or futures.

Metatrader 5

In the first section we will review the Metatrader 5 platform (MT5) and the types of accounts that MT5 offers. We will also make our first contact with the MQL5 language and we will see what type of applications we can do, in addition to trading robots.

Before the end of this section, you will have had your first experience with coding and you will have seen how easy is to code for MT5.

MQL5 Language Fundamentals

Sections 2 to 5 focus on the MQL5 language fundamentals. During these sections we will cover all the MQL5 language basic features, namely: variables and data types, types of operations, control flow operators and functions.

We took care of providing the course with many trading-related examples and assignments. This will keep the content engaging while brief enough to speed you up to the most exciting part of the course, sections 6 to 12.

Expert Advisors and trading systems

In section 6 we will introduce you to expert advisors and a well-known and popular trading system that has been used extensively in the past. In sections 7 to 11 we will apply all the knowledge acquired in previous lectures to code a trading robot that trades with our trading system.

We will make a well-structured layout for our expert advisor and we will code everything it needs to apply the system, from how to read and get price and indicator data to how to send orders and open, modify and close positions, and much more.

Backtest, revision and deployment

In the last section we will backtest and deploy the trading robot in different markets to review that it applies the trading system correctly. Finally, we will learn about VPS and we will give you next steps to keep growing as an algorithmic trader.

At the end, you will have a trading robot that automates a trading system and trades non-stop while the markets are open and, more importantly, you will have a good skill set to code your own robots.


  • Only requirement: willingness to learn
  • Trading knowledge is not required
  • Programming experience is not required

Who is this course for:

  • Traders of any experience that desire to free-up their time from monitoring the charts
  • Traders who want to improve their trading performance through quantitative automated trading
  • Anyone who would like to learn how to program in MQL5 and similar programming languages like C++, C# or java

MQL5 Course Content

1- Why Upgrade To Algorithmic Trading

2- Algorithmic Trading Technology

3- Introduction To Metatrader 5

4- MT5 Position Accounting systems

5- MT5 Demo Account & Installation (i)

6- MT5 Demo Account & Installation (ii)

7- MQL5 Applications

8- Introduction To Metaeditor

9- Coding Our First Program

10- MQL5 Syntax

11- Identifiers

12- Comments

13- Introduction To Section 2

14- Variables

15- Integer Types

16- Boolean Type

17- Color Type

18- Datetime Type

19- Enum Type

20- Real Types

21- String Type

22- Array Type

23- Struct Type

24- Constants

25- Typecasting

26- Predefined Variables

27- Scope Of Variables

28- Input Variables

29- Assignment: Variables & Data Types

30- Introduction To Section 3

31- Arithmetic Operations

32- Assignment Operations

33- Relation Operations

34- Boolean Operations

35- Assignment: Operation Types

36- Introduction To Section 4

37- The if-else Operator

38- The Ternary Operator

39- The Switch-case Operator

40- The Do-while Operator

41- The For Operator

42- Assignment: Choice & Loop Operators

43- Introduction To Section 5

44- Function Declaration & Definition

45- Function Call

46- MQL5 Predefined Functions

47- Assignment: Functions

48- Introduction To Section 6

49- Preprocessor Directives

50- MQL5 Event Handlers

51- Expert Advisor & Trading System Workflow

52- A Trading System For Your Expert Advisor

Quiz: Expert Advisors & Trading Systems

53- Introduction To Section 7

54- EA Layout

55- EA External Inputs & Global Variables

56- Rationale For Controlling Bar Opening

57- How To Control Bar Opening

58- Introduction To Section 8

59- Entry Signal: Price

60- Entry Signal: Price Normalization

61- Assignment (i): Accessing Price Data

62- Entry Signal: Moving Average Indicator (i)

63- Entry Signal: Moving Average Indicator (ii)

64- Assignment (ii): Price & Moving Average Entry Signal

65- Multibuffer Indicators: Bollinger Bands

66- Assignment (iii): Moving Average Exit Signal

67- Introduction To Section 9

68- Types Of Order Execution

69- Order Placement

70- Order Placement (ii): Filling Policy

71- Assignment: Order Placement Function

72- Check Of Placed Positions

73- Close Trades Function

74- Introduction To Section 10

75- Stop Loss Function

76- Assignment: Take Profit

77- Trade Modification Function

78- Trailing Stop Loss Function

79- Break-even Function

80- Stops Levels Functions

81- Introduction To Section 11

82- Netting EA: Check Of Placed Positions

83- Netting EA: Order Placement

84- Netting EA: Trade Modification

85- Netting EA: Close Trades

86- Netting EA: TSL & BE

87- Introduction To Section 12

88- Include Files

89- Backtesting: Does The EA Trade As Expected?

90- Backtesting In MT5

91- Optimization In MT5

92- Optimization: Risk Of Overfitting

93- MT5 Set-up For Algorithmic Trading

94- Review Of The Hedging EA Operative

95- Review Of The Netting EA Operative

96- About VPS (i)

97- About VPS (ii)

98- Course Conclusion

Bring Your Trading To The Next Level

Upgrade Your Trading

No coding knowledge required

What Our Students Say On Udemy

Some kind words from our amazing students

Thanks so much for your very valuable training. I really enjoyed it, and appreciate that you gave your best. I am totally new and I could get the overall awareness of EA and prepared me to get hands on and implement my ideas.

Venkateshwar Korpol

Thank you for this MQL5 programming course! It was very well explained and covered major aspects of trading management system. I will certainly continue to learn with José for future courses on MQL5. I highly recommend!

François Bernard

Really excellent course that I thoroughly enjoyed. Being new to MT5 , but with a coding background, I found the course pitched at the right level and it satisfied my objective of learning enough about MQL and MT5 to be able to code EA’s on my own, which was great – thanks.

Jonathan Dyke

Excellent course, he really covers the basic syntax of MQL5. For those who knows C++ this is going to be easy. And the robot section is very good, he does program modular and ordered and covers the basic functions we need to use for algoritming trading, you surely will reuse them in your advisors.

Sergio Da Silva

This course is good. I liked the position management section where we trail stop loss and do break even. I think we don’t need profit target as you would note as trend continues you may capture a lot of pips. The coding follows simple moving average as strategy however based on this course you can build your EA with your owns strategy. Please note that this course is not for building indicators. And this is fine as course sticks to it’s course progress.

Sanjay Maurya