Learn MQL5: Build an 8-Currency Hedging Robot (MetaTrader 5)
4.3 (147 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
3,174 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn MQL5: Build an 8-Currency Hedging Robot (MetaTrader 5) to your Wishlist.

Add to Wishlist

Learn MQL5: Build an 8-Currency Hedging Robot (MetaTrader 5)

Learn MT5 Trading Robots (MQL5): Build Robots for Stocks, Futures and Multi-Currency Trading
Best Seller
4.3 (147 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
3,174 students enrolled
Created by Lucas Liew
Last updated 9/2017
Current price: $10 Original price: $150 Discount: 93% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 5 hours on-demand video
  • 37 Articles
  • 17 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Design, test and trade complex strategies involving multiple products
  • Master a powerful up and coming software for Algorithmic Trading
  • Code a Trading Robot in less than 1 hour
  • Code in MQL5 and easily pick up C++ and JAVA
  • Backtest their strategies more accurately by using real tick data
  • Free up plenty of time by automating trading
  • Be a freelance coder (go do a few freelance jobs and earn back the cost of this course!)
View Curriculum
  • Computer, internet connection (Either Windows, Mac or Linux but Windows preferred)

From the Creator of the Most Popular Algorithmic Trading Course on Udemy with over 21,000 students!


Course last updated August 2017!

This course is the first of a 4-part mega course. Scroll down to see the full list of Chapters.

Price will increase as more lectures are added.

The author of this course is one the most viewed writers in Algorithmic Trading on Quora and has been featured on Investopedia.


Huh? What is a Trading Robot?

A Trading Robot is a set of programming code that analyses and trades the market on its own. Trading Robots allow you to trade the markets without human intervention!

What is MetaTrader 5 (MT5) and MQL5?

MetaTrader 5 is a software that allows us to build trading robots. It is the successor to MetaTrader 4. MQL5 is the programming language we use in MT5. When MT5 was initially released in 2010, it was not very popular. However, recent updates to MT5 (changes to the hedging issue) has increased its popularity among traders and brokers.

MT5 may be the future, so let’s master this stuff now!

Some highlights of MT5 (aka benefits over MT4):

  • Trade Stocks and Futures
  • Multi-Currency/Product Backtesting (this opens up a wide range of strategy options!)
  • Insanely Fast Optimisation times (1000X faster than MT4!)
  • Backtesting on REAL tick data
  • Automatic Walk-Forward Optimiser
  • The MQL5 language is harder to pick up compared to MQL4. But once you get it, you can easily pick up other object-oriented languages like C++ and JAVA
  • In the unlikely scenario where MetaQuotes discontinues MT4, we are screwed. Thus, it is good to have a backup plan (aka learn MT5)

What does this course offer?

This course teaches the knowledge required to effectively build trading robots using MT5 and MQL5. 

You will be able to build advanced strategies that span across multiple financial products (Stocks, Futures, Forex and CFDs), shorten optimisation times from hours to minutes and increase your backtest accuracy by testing on real ticks. 

So yea, these are massive improvements over MetaTrader 4! (It’s kind of a big deal)

We do NOT promise that you will strike it rich overnight. We do not make ridiculous claims (like those you see in newspapers and online ads) that you will make $3722 every night.

This course WILL, however, offer you the years of experience we have in building Robots. You will understand the pitfalls and keys to success to design great robots. You will avoid the hundreds of mistakes we made in our journey.

What is an 8-Currency Hedging Trading Robot?

MetaTrader 5 allows us to backtest and execute advanced strategies that span across multiple financial products (this is not possible with MT4), so we’ll utilise that to build advanced multi-asset strategies. 

We will build an 8-Currency hedging trading robot. This trading robot analyses the 8 major currencies (USD, EUR, JPY, GBP, AUD, CAD, CHF and NZD) and exploits inefficiencies when any of them goes out of whack. This trading robot will serve as a good template for you to experiment and build your own strategies. 

Full Syllabus (These are Chapters not Lectures!)

<Course 1: Learn MQL5: Build an 8-Currency Hedging Robot (MetaTrader 5)>

  • Here's What You Are In For!
  • Programming Fundamentals 1: Variables and Conditionals
  • Robot 1: Anna - Our First Robot!
  • Getting Market Information - Troublesome but Essential Stuff
  • Understanding the Strategy Tester (Part 1)
  • Programming Fundamentals 2: Loops + Importing Code
  • Programming Fundamentals 3: Functions - Factories that take in X and produce Y
  • (We are here!) Robot 2: Bella - Utilising Volatility!
  • What’s the deal with OOP - Mastering Object-oriented Programming (Part 1)
  • Pseudo Data Management in MT5
  • Understanding Our Optimiser (Part 1)
  • Programming Fundamentals 3: Arrays and Indicators
  • Building Indicators 1: Simple Indicators and Multi-buffers
  • Bonus Robot: Zelda - 8 Currency Arbitrage Robot

<Course 2: Learn MQL5: Master OOP + Time Manipulation>

  • Programming Fundamentals 4: Self-Learning and Debugging
  • What a Mess! - Order Management (Part 1)
  • Robot 3: Charlotte - Different Order Types
  • Understanding the Strategy Tester (Part 2)
  • Robot 3A: Charlotte 2.0 - Different ways to Code Orders
  • MQL5 Coding Nuances - Get to know the small things
  • Robot 4: Diana - Turtles
  • Programming Fundamentals 5: Manipulate Date and Events
  • MT5 In-built EA Generator
  • Robot 5: Emma - A Robot based on Time
  • Understanding the Optimiser (Part 2) - Multi-threaded and Walk Forward
  • Robot 6: Francoise - Net Positions, No Hedging
  • Building Indicators 2: Momentum
  • What’s the deal with OOP - Mastering Object-oriented Programming (Part 2)

<Course 3: Learn MQL5: Semi-Algo Robots and Trading on News>

  • Uses and Types of Scripts
  • Robot 7: Genevieve - Semi-Algo Robot
  • Overview of Different Algo Trading Strategies
  • Robot 8: Haley - Mean Reversion
  • Building Indicators 2: Oscillators
  • Robot 9: Iris - Breakout
  • Building Indicators 3: Volume
  • Robot 10: Judy - Strategy based on Volume
  • Programming Fundamentals 6: Understanding Libraries
  • Math Analysis
  • Building Indicators 4: Multi-asset (Correlations aka Proxy Trading)
  • Programming Fundamentals 7: Clean code + Graphical Objects
  • Trading on News and External Events
  • Robot 11: Kate - News Trading

<Course 4: Learn MQL5: Multi-Asset Arbitrage - Futures and Stocks>

  • Robot 12: Lena - Single Proxy Trading
  • Robot 12A: Lena 2.0 - Proxy Asset + Proxy News Trading
  • Modifying Robots for Live trading
  • Robot 13: Naomi - Multiple Proxy Trading
  • Robot 14: Olivia - Multi-asset (3 Currency Arbitrage Trading)
  • Futures Trading with MQL5
  • Robot 15: Phoebe - Futures Robot
  • Stock Trading with MQL5
  • Robot 16: Quinn - Stock robot
  • Robot 17: Rachel - Futures Pair Trading
  • Robot 18: Samantha - Multi-asset Arbitrage (4 Futures Hedging Strategy)
  • Robot 19: Tiffany - Statistical Arbitrage (7 Stocks Arbitrage Strategy)

Frequently Asked Questions

// I'm a complete beginner. Is this course suitable for me?

Yes, this course is designed for beginners. The course is prepared in a progressive manner. It entails a graphical, step-by-step approach with minimal technical jargons.  But of course, you will need to put in more effort than someone with a stronger background to master the content.

// I can't code! Is this course suitable for me?

Yes, this course is designed for those who are new to programming. We have a 24/7 support channel to assist you with coding issues!

// I can code! Is this course suitable for me?

If you are an expert at MQL5. Congratulations! You don't need this course. For everyone else, welcome aboard.

// What if I am unhappy with the course?

We would never want you to be unhappy! If you are unsatisfied with your purchase, contact Udemy within the first 30 days and they will issue you a full refund. No questions asked.

// How long do I have access to the course?

How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.

// Are we expecting more content in this course?

Yes! We are adding 10 more sections worth of content to this course. Content will be added weekly.

// Do you teach conceptual theories on Algorithmic Trading?

Yes we do, but not in this course. Check out our other courses for that.

About the Course

  • Free: All software and data used are free! All robot testing and trading done in this course are done using virtual money!
  • Unconditional 30 days money-back guarantee – You have absolutely nothing to lose
  • Full lifetime access!
  • Access to all future lectures. Over 9 sections (50 lectures) to be added in the coming months. (Note that Course Price will rise as more sections are added)
  • 24/7 access to Luke Code Support (LCS). LCS is an email conduit where you can ask for help for any programming issues.
Who is the target audience?
  • Those entering the workforce soon and want to explore their options
  • Those wanting to endeavour into trading as a side-job
  • Those wanting a guide who is on stand-by to assist them
  • Those who know MQL4 and want to learn MQL5
  • Those who want to algorithmically trade futures and stocks
  • Those who want to master MetaTrader 5
  • Those who want to learn MT5 in case MetaQuotes discontinues MT4
  • Who should not take this course: Those wanting to learn about High Frequency Trading. This course focuses on Low Frequency Trading
  • Who should NOT take this course: Those wanting a secret recipe to strike it rich overnight
Compare to Other MQL Courses
Curriculum For This Course
88 Lectures
Here's What You Are In For!
13 Lectures 44:52

The First Step - How To Start Your Journey?

MT5 for Mac

MT5 Basic Guide

Download Code Template

MT5 vs MT4 vs Other Software (and Why FX)

Black Algo Trading Design Theory | Our Holy Grail

Luke Code Support + Thanks
Programming Fundamentals 1: Variables And Conditions
14 Lectures 54:40
The 3 Types of Code

Download Code for Programming Fundamentals 1

Identifiers - Names of Stuff

Reserved Words - Words you cannot use

Variables - The Basic Building Blocks!

Practice Time: Syntax and Variables

Expressions and Operations (Plus, Minus, Multiplication and Division)

Practice Time: Variables, Operations and Expressions

More info on Datatypes, Operations and Precedence

Get Coding Help – Read the Docs + Errors vs Warnings!

Conditional - If this then that (Part 1)

Conditional - If this then that (Part 2)

Practice Time: Conditional - If this then that
Robot 1: Anna - Our First Robot!
9 Lectures 29:58
Background to our Asset Class

Chart Reading 101 + Your First Indicator

Download Codes for Anna

Anna 1.00 - Theory behind Anna

Understanding Shift

Anna 1.00 - Understanding the Cross

Anna 1.00 - Coding Anna (Part 2)

Anna 1.00 - Coding Anna (Part 3)
Getting Market Information - Troublesome but Essential Stuff
8 Lectures 27:49
Download Codes for Section

Getting Bid and Ask Prices

Code differences from Anna 1.01 to Bella 1.00

Getting Indicator Data

Exercise on Referencing OHLC Prices

MQL5 vs MQL4: Differences when Referencing Prices and Indicators
Understanding Our Strategy Tester (Part 1)
3 Lectures 14:18
Our Strategy Tester - Where the Magic Happens

Understanding our Tester Visualization Platform

Helpful Links for Understanding our Strategy Tester
Programming Fundamentals 2: Loops + Importing Code
9 Lectures 29:38
Download Code for Loops

Loops - Doing something many times (Part 1 - While)

Loops - Doing something many times (Part 2 - For)

Loops Practice 1 - Simple Application to Trading

Multi-Step Loops - Jumps of more than 1

Nested Loops = Loopception

Loop Operators - Break and Continue

Loops Practice 2 - Calculating Price Drawdowns

Include Method - Bringing Other Code In
Programming Fundamentals 3: Functions - Factories that take in X and produce Y
7 Lectures 21:08
Theory behind Functions - Our Little Factories (Part 1)

Theory behind Functions - Our Little Factories (Part 2)

Download Code for Functions

Programming Simple Functions

Output Nothing - Returning Void

Anna 1.02 - Using Functions in our Robots

General Coding Practice 1
Robot 2: Bella - Utilising Volatility!
9 Lectures 33:54
Download Code for Bella

Referencing Multiple Timeframes

Bella 1.00 - Multi-Timeframe Robot

Understanding Trade Status - Return Codes/RETCODE

Introducing the ATR

ATR Stops and Bella 1.01

Bella 1.01 - Volatility Stops

Bella 1.02 - Trailing Stops

AlgoTrading101 Theories: Market Prudence and Noise Buffer
The Confusing Object (OOP) - Mastering Object-Oriented Prog (Coming soon...)
10 Lectures 46:07
Download Code for Chapter (OOP)

Object Oriented Programming - Tell me what is OOP like I'm a 5 year old

Don't get Confused - Difference between Objects and Classes

Object Variables - Basically just normal variables with attached to objects

Object Functions - Basically just normal functions with attached to objects

Objects Positioning - Where to put what

Accessing Objects - Limiting the reach of Objects Variables/Functions

Accessing Objects - Retrieving and Assigning Values to Private/Protected Objects

Understanding the Class for Trading - CTrade (Part 1)

Understanding the Class for Trading - CTrade (Part 2)
To Buy Big Or Small? Position Sizing And Money Management
2 Lectures 14:37
AlgoTrading101 Theories: Coin Flip Game: Understand Bet Sizing by Flipping Coins

AlgoTrading101 Theories: Theory behind Bet/Position Sizing (aka Money Mgmt)
4 More Sections
About the Instructor
Lucas Liew
4.4 Average rating
1,435 Reviews
23,303 Students
2 Courses
Developer and Trader

Lucas has been designing and building algorithmic trading robots since 2010. He worked at a proprietary trading firm and teaches programming for financial applications to Government of Singapore Investment Corporation (GIC), one of the largest sovereign wealth funds in the world.

Lucas does consulting for algorithmic trading projects. He has over 5 years of experience coaching in MQL4, MATLAB and VBA. He was the Head of the Quantitative Finance Society in Singapore Management University.

Lucas has been featured on Investopedia and is one of the most viewed writers in Algorithmic Trading on Quora.