Skip to content
Play overlay
Preview this course

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

Learn how to code a trading robot from scratch in MQL5 programming language + Complete + Trading Bot (Forex, Crypto ...)

Jose Martinez Hernandez


£29.99 inc VAT
Study method
Online, On Demand What's this?
10.1 hours · Self-paced
No formal qualification
  • Reed Courses Certificate of Completion - Free
Additional info
  • Tutor is available to students

3 students purchased this course

Add to basket or enquire


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

In short, you will learn:

  • How to code a trading robot (expert advisor) that can trade automatically in different markets (e.g. forex, crypto, indices, stocks, commodities)
  • How to program in the most popular language for trading in the financial markets (MQL5)
  • A well-known popular trading system
  • How to read and interpret the markets with algorithms
  • How to send, modify and close market orders
  • How to backtest and optimize trading robots in Metatrader 5


10h 9m
    • 16: Introduction To Section 2: Variables & Data Types Preview 00:23
    • 17: Variables 05:41
    • 18: Integer Types 05:29
    • 19: Boolean Type 03:19
    • 20: Color Type 04:19
    • 21: Datetime type 05:02
    • 22: Enum Type 05:44
    • 23: Real Types 02:31
    • 24: String Type 04:44
    • 25: Array Type (i) 05:30
    • 26: Array Type (ii) 02:28
    • 27: Array Type (iii) 05:46
    • 28: Struct Type (i) 04:18
    • 29: Struct Type (ii) 05:14
    • 30: Constants 02:30
    • 31: Typecasting 06:22
    • 32: Predefined Variables 03:58
    • 33: Scope Of Variables 07:40
    • 34: Input Variables 04:50
    • 35: Assignment: Variables & Data Types 12:16
    • 36: Introduction To Section 3: Operation Types 00:20
    • 37: Arithmetic Operations (i) 05:42
    • 38: Arithmetic Operations (ii) 02:45
    • 39: Assignment Operations 01:52
    • 40: Relation Operations 04:10
    • 41: Boolean Operations 04:38
    • 42: Assignment: Operation Types 06:59
    • 43: Introduction To Section 4: The Choice & Loop Operators 00:33
    • 44: The If-else Operator (i) 02:48
    • 45: The If-else Operator (ii) 05:04
    • 46: The Ternary Operator 05:10
    • 47: The Switch-case Operator 06:03
    • 48: The while Operator 03:29
    • 49: The Do-while Operator 02:27
    • 50: The For Operator 04:07
    • 51: Assignment: Choice & Loop Operators 05:05
    • 52: Introduction To Section 5: Functions 00:30
    • 53: Functions Declaration & Definition 04:19
    • 54: Functions Call 05:47
    • 55: Predefined Functions 16:14
    • 56: Assignment: Functions 01:46
    • 57: Introduction To Section 6: EA & Trading Systems 00:58
    • 58: Preprocessor Directives 03:16
    • 59: Event Handlers 04:42
    • 60: Workflow Of A Trading System In An EA 02:08
    • 61: A Trading System For Your Expert Advisor 04:44
    • 62: Quiz: Expert Advisors & Trading Systems 09:00
    • 63: Introduction To Section 7: General Settings & Bar Opening 00:33
    • 64: EA Layout 04:09
    • 65: EA External Inputs & Global Variables 12:31
    • 66: Rationalle For Controlling Bar Opening 03:33
    • 67: How To Control Bar Opening 10:32
    • 68: Introduction To Section 8: EA Indicators & Trading Signals 00:30
    • 69: Entry Signal: Price 09:19
    • 70: Entry Signal: Price Normalization 09:48
    • 71: Assignment (i): Accessing Price Data 03:16
    • 72: Entry Signal: Moving Average Indicator (i) 10:10
    • 73: Entry Signal: Moving Average Indicator (ii) 09:20
    • 74: Assignemnt (ii): Price & Moving Average Entry Signal 18:10
    • 75: Multibuffer Indicators: Bollinger Bands 05:58
    • 76: Assignment (iii): Moving Average Exit Signal 07:41
    • 77: Introduction To Section 9: EA Order Placement 00:21
    • 78: Types Of Order Execution 03:03
    • 79: Order Placement (i) 21:03
    • 80: Order Placement (ii): Filling Policy 06:20
    • 81: Assignment: Order Placement Function 14:43
    • 82: Check Of Placed Positions 10:35
    • 83: Close Trades Function 12:32
    • 84: Introduction To Section 10: EA Position Management 01:04
    • 85: Stop Loss 10:31
    • 86: Assignment: Take Profit 07:50
    • 87: Trade Modification Function 14:37
    • 88: Trailing Stop Loss 21:02
    • 89: Break-even 12:36
    • 90: Stops Level 18:00
    • 91: Introduction To Section 11: EA Changes For Netting Accounts 00:33
    • 92: Netting EA: Check of Placed Positions 04:23
    • 93: Netting EA: Order Placement 02:39
    • 94: Netting EA: Trade Modification 01:53
    • 95: Netting EA: Close Trades 02:57
    • 96: Netting EA: TSL & BE 05:37
    • 97: Introduction To Section 12: Backtesting & Put In Place 00:36
    • 98: Include Files 06:16
    • 99: Backtesting: Does the EA Trade as Expected 08:05
    • 100: Introduction To Backtesting In MT5 06:38
    • 101: Introduction To Optimization In MT5 05:14
    • 102: Optimization Risk Of Overfitting 04:25
    • 103: MT5 Set-up For Algorithmic Trading 05:24
    • 104: Review Of The Hedging EA Operative 13:34
    • 105: Review Of The Netting EA Operative 06:00
    • 106: About VPS (i) 02:00
    • 107: About VPS (ii) 01:00
    • 108: Course Conclusion 02:55

Course media


The course is organised in 12 sections:

  • In the first section we will review the Metatrader 5 platform (MT5) and have a first look at the MQL5 language and programs.

  • Sections 2 to 5 focus on the MQL5 language fundamentals. During these sections we will cover all of the language basic features, providing you with many trading-related examples and assignments that will keep the content engaging while brief enough to speed you up to the most exciting part of the course, sections 6 to 12.

  • 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 lessons to code a trading robot that automates a trading system and trades non-stop while the markets are open.

  • Finally, in section 12 we will backtest and deploy the trading robot in different markets to review that it applies the trading system correctly.

Now is the right time to learn algorithmic trading

In today’s modern markets, the share of algorithmic trading in volume terms stands around 70-80 per cent, and there are several reasons for that:

  1. Algorithmic trading allows you to trade as many strategies or markets as your computing power provides, overcoming human limitations that constrain manual traders.

  2. Automating your strategies frees up time from repetitive screening of the markets that you can then allocate to research, leisure, or other activities. Furthermore, robots can trade 24/7 which mean they can trade any session, at any time and without rest, which is impossible to do for a single human.

  3. Emotionless and error-free. Algorithms read patterns and apply pre-established coded rules without experiencing fear or any other emotions, which means that robots do not commit mistakes, programmers do.

  4. Algorithmic trading will not only automate your trading, but also it is the first step to trade like a quant, which means that every decision you take will be backed by data and statistics that will be provided by your algorithms and this will increase your chances of success in the markets.

  5. Backtesting and optimization is much faster and comprehensive through algorithms than through manual means with spreadsheets, which will allows you to know the performance of a strategy in the past and, again, increase your chances of success in the markets.

Are you passionate about trading?

Do you want to free-up time from monitoring screens?

Do you want to increase your chances of winning in the markets?

If the answer is "Yes", and you are ready to put in the hard work, you are ready to start your algorithmic trading journey today!

I am confident that you will find this is one of the best courses to learn algorithmic trading and it delivers sharing insights that you won’t find easily elsewhere.

I am excited to watch you take your first step in your algorithmic trading journey and I hope to see you inside!

The expert advisor will be provided to you at the end of the course.

- José Martínez

Student Testimonials - What Our Students Say!

★★★★★ "This has to be one of the best courses I’ve taken regarding EA creation using MQL5. Its a ‘No Fluff’ and straight to the point course. Explains the basics very well and then moves onto designing and deploying an EA from start to finish. Jose explains the topics in a clear and concise manner and the best bit was […]"

Reviewed by Herman M.

★★★★★ "This course really helped me. It was updated and covered a real lot of topics that other courses left me hanging. I strongly indicate this course if you are serious about algorithmic trading and programming your own expert advisors. I can only thank Mr Hernández for the invaluable knowledge given."

Reviewed by Andrew Sandrini Vaz

★★★★★ "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. […]"

Reviewed by Sanjay Maurya

★★★★★ "That was awesome MQL trading course. I highly recommend who try to start MQL5. Because this course just not fundamentals. You learning with creating EA. That way you can understand so quicly. Another course who make another person , that was horrible. So If you consider to which course do you buying. I’m recommend this course. […]"

Reviewed by 日髙悠太

★★★★★ "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."

Reviewed by Sergio Da Silva

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 code in MQL5 and similar programming languages like C++, C# or java.


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

Career path

  • Algorithmic Trader
  • Capital Manager
  • MQL5 Software Developer

Questions and answers

Currently there are no Q&As for this course. Be the first to ask a question.


Reed Courses Certificate of Completion

Digital certificate - Included

Will be downloadable when all lectures have been completed.


Currently there are no reviews for this course. Be the first to leave a review.


Study method describes the format in which the course will be delivered. At Reed Courses, courses are delivered in a number of ways, including online courses, where the course content can be accessed online remotely, and classroom courses, where courses are delivered in person at a classroom venue.

CPD stands for Continuing Professional Development. If you work in certain professions or for certain companies, your employer may require you to complete a number of CPD hours or points, per year. You can find a range of CPD courses on Reed Courses, many of which can be completed online.

A regulated qualification is delivered by a learning institution which is regulated by a government body. In England, the government body which regulates courses is Ofqual. Ofqual regulated qualifications sit on the Regulated Qualifications Framework (RQF), which can help students understand how different qualifications in different fields compare to each other. The framework also helps students to understand what qualifications they need to progress towards a higher learning goal, such as a university degree or equivalent higher education award.

An endorsed course is a skills based course which has been checked over and approved by an independent awarding body. Endorsed courses are not regulated so do not result in a qualification - however, the student can usually purchase a certificate showing the awarding body's logo if they wish. Certain awarding bodies - such as Quality Licence Scheme and TQUK - have developed endorsement schemes as a way to help students select the best skills based courses for them.