Skip to content
UdemyTrading & InvestingPaid courseAll LevelsCertificate

Algorithmic Trading in MetaTrader 5: Build Your First Bot (Udemy.com)

Learn How To Code A Trading Bot From Scratch In The MQL5 Programming Language For MT5 + Trading Bot (Forex, CFDs ...)

Created by: José Martínez Hernández

Last updated August 2026

icon
What you will learn

  • How to build a completely automated trading robot (expert advisor) that can trade 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
  • The basics of backtesting and optimization of trading robots in Metatrader 5

How it compares

Against the other 278 rated Udemy courses in Trading & Investing on CourseDuck:

  • Rating4.3 out of 5higher than 16% of them
  • Reviews610#115 of 279 by number of reviews
  • Length10.3 hourslonger than 78% of them
  • Last updatedAugust 2026more recently than 71% of them

icon
Course Description

In this course, you will learn how to fully automate your trading using MetaTrader 5 trading robots (expert advisors). We will code an expert advisor from scratch that can trade in different financial markets, such as forex, cryptocurrencies, indices, commodities, and stocks.

The course is organized into 2 blocks and 12 sections.


BLOCK 1: MQL5 PROGRAMMING LANGUAGE

In section 1, we will review the MetaTrader 5 (MT5) platform and introduce the MQL5 programming language and its applications.

In sections 2 to 5, we will cover the fundamentals of the MQL5 language. In these sections, we will address all the basic features of the language, with plenty of examples and exercises closely related to trading.

This way, the course will offer you practical, engaging, and interesting content while being concise to fast-track you to the most exciting part, sections 6 to 12.


BLOCK 2: METATRADER 5 EXPERT ADVISOR  CODING

This block begins with section 6, where we will introduce you to expert advisors and share a widely known trading system that has been extensively used 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 uninterrupted as long as the markets are open.

We will equip our expert advisor with a structure that serves as a framework for other projects, including triggers for entry and exit points.

Additionally, we will include basic aspects of position management, such as placing stop loss and take profit orders, as well as more advanced management like trailing stop loss and break-even.

Finally, in section 12, we will validate the system. To do this, we will subject the expert advisor to backtesting against historical data to ensure the code is correct.

Ultimately, we will deploy it in forex, stocks, indices, and commodities markets in a trading account. This will allow us to validate that the robot works both in a trading account and in simulation.



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, bots 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!

This course is backed by Udemy’s 30 day money back guarantee.

If you're not happy for any reason you will be refunded in full!

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

icon
Udemy Discount

The discount is applied through our link. Open the course from here and Udemy's current promotional price is applied at checkout on most courses, no code to type.

Some courses are excluded from Udemy's promotions. If the price does not drop, clear your browser cookies and use the button again.

icon
Instructor Details

José Martínez Hernández

My name is José Martínez, and I’m an algorithmic trader with audited track records at Darwinex and Darwinex Zero.

I started my career as a lawyer in IT law, privacy, and cybersecurity. But in 2017 I discovered trading. After struggling with manual trading and unreliable “EA builders,” I fully committed to algorithmic trading.

In 2021, I left my legal career to trade full-time and to teach other traders how to build real, auditable, and replicable systems — without the hype.

Today, I dedicate myself to helping students worldwide take their first steps into professional algorithmic trading, sharing not only my technical knowledge but also a structured methodology based on risk control and verified results.

icon
More Trading & Investing courses

$11.99

$11.99

$16.99

$15.99

$11.99

$12.99

icon
Reviews

4.3

610 ratings on Udemy

Select a bar to show only those reviews.Select the bar again to show every rating.

By Jae Yong Chung on 11/23/2025

In the beginning, it started pretty great. Then, after showing some concepts he goes into showing complicated examples. I think he could make the course more beginner friendly, but the courses feel very rushed. He shows a bunch of examples without going in depth on why certain things are written the way they are. He doesn't explain in detail what certain parts of the code does or why they are necessary. I wouldn't recommend taking this course.

By ONLINE BUSINESS on 7/21/2025

The course content is decent, but I’m disappointed in the instructor’s support. As a paying student, I expected some level of guidance or at least help when facing issues, especially regarding the EA provided at the end of the course. I asked for help customizing the EA to fit my own strategy, but instead of offering any support, the instructor directed me to a third-party website where I’d have to pay a large amount of money. That wasn’t what I expected after paying for the course. If I had known there would be no real support or flexibility, I honestly wouldn’t have enrolled. It feels like the course was just a gateway to upsell extra services, which is quite disappointing.

By Baris Yakut on 5/11/2025

I found the course very slow paced and targeted to absolute beginners. I am fine with a beginner friendly course but would have expected it to take it to slightly next level at the end of the course. There is only one trading example here which is the MA strategy. The creator shows the main functions to place an entry and exit order but that's about it. It would be great if he used different functions, methods, conditions for different types of strategies and just showed more examples. Drawings/plots are also not explained in this lecture which I think is a bummer. It is an MA trading strategy but you don't even get to plot an MA line programmatically. Topics like multi timeframe analysis, limit orders are also not explained in this course. Another section I would have loved to see would be about debugging. Now, we have some knowledge to write some piece of code but without some debugging techniques in MQL5, it might be difficult to tackle the problems one can face. Cannot say it is a bad course but there is definitely room for improvement. I don't think anyone without any software development background can go anywhere from here.

By Brenton Montgomery on 4/17/2025

As a novice/semi-beginner It took some time to get used to this methodology, in order to apply it successfully in the real markets; but I knew from the start that this strategy is powerful. I've been able to capture massive trend movements on multiple occasions. With proper risk management and psychology, I've also managed to pass the first phase of my prop firm challenge thanks to this course. Can't wait for the next chapter of my trading journey, my heartfelt thanks to the universe to provide this course to me. And of course thank you Professor Hernandez! Brilliant!!

By Ben on 3/3/2025

Jose was a very good instructor, very knowledgeable and very much to the point for the basic language which is great and covered almost every topic except OOP but never the less a great introduction, ultimately i learnt very efficiently in that regard. Exceptional communicator no "ums's" "err's" or "ahh's", and so delivery was exactly on topic. Great introduction to writing an EA from scratch with a quite a few trade management code blocks to work with while i'm learning. Credit where credit is due, highly recommended!

By Hini Majesty on 2/6/2025

Great course, i have written basic mql5 indicators in the past by putting together pieces of code here and there leveraging programming skills from other languages but your course delivered a comprehensive and well outlined path to doing it the right way. I was hoping to see drawing of objects on the chart but i guess you cover that in other courses which i am definitely going to buy . Good Job.

By Tshepo Khunou on 3/19/2024

Thank you for this wonderful course. I definitely do not regret buying this course as it is easy to follow and filled with tons of information I never knew before. I am lagging behind with my coding skills but great effort is being put into achieving better results. Thanks again for taking the time to share your knowledge, definitely looking forward to purchasing an advanced course you have setup.

By Sikander on 9/24/2023

Having completed over 30 courses across a wide range of topics on Udemy, I can confidently say that this course stands out as the best so far. It strikes a remarkable balance between comprehensive content, lucid explanations, and illustrative examples. The course's pacing is impeccably structured, offering in-depth details for seamless comprehension while maintaining a dynamic flow that facilitates rapid progress. The lectures are succinct yet brimming with valuable insights and knowledge. I would definitely recommend this course to individuals, whether seasoned programmers or beginners, seeking a swift and highly effective immersion into MQL5.

By Fausto Renda on 2/20/2023

Good course, it satisfied my expectations . Lessons are well structured. However, it has to be said that English pronunciation is poor and the tone is generally flat and scarcely involving. Moreover, I would have appreciated more material through the whole course, for example the script updated at each chapter, instead of having everything at the end. Also, sometime the instructor takes a strange approach, it builds a complex structure (e.g. the hedging) and then moves to the simpler (the netting) by deleting code... from a learner point of view that would have been convenient doing rather the opposite, starting with the simple and moving to the complex. In conclusions, there are some minor drawbacks, but otherwise the course is great, it gives what promised.

By Herman M on 11/15/2022

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 incorporating the 'MA' & 'Bollinger Bands' indicators into his EA and using them as entry and exit signals. The way he showed how you could retrieve indicator values for pretty much any indicator in my opinion was 'worth its weight in gold' as now you can use that method on designing and testing pretty much any other indicator out there. Excellent course and would 'Highly' recommend. He did mention about an advanced course and I hope he releases it soon because if its as good as this one it will be brilliant! Thanks Jose!

Showing all 10 reviews on CourseDuck

Read all 610 reviews on Udemy

icon
Quality Score

No CourseDuck member has rated this course yet. Taken it? Give each part a thumbs up or down.

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 86 / 100