MetaQuotes Language or MQL is a proprietary programming language that is used to program Expert Advisors, Custom Indicators, Scripts and even libraries for the MetaTrader trading platform. There are two different versions: MQL4 and MQL5. Do not be confused these two versions are two different programming languages. MQL4 is embedded only for MetaTrader 4 (it will not work on Metatrader 5), while MQL5 is embedded only for MetaTrader 5 trading platform. Since MetaTrader 4 is a much widely used platform we will put more emphasis on learning MQL4.
Learning MQL will allow you to translate your trading strategy into the program and in that manner, you will be able to apply your trading rules 24/7, also you can follow as many trading instruments as you want and execute the trade at the same moment as the rules are met. It can help you to test your trading strategies faster and more precisely. Thus knowing MQL will be a useful asset and it will improve your trading results.
Using MQL4 you can create following types of programs:
- Expert Advisors (or Forex Robots) – an automated trading system that independently executes many different trading operations depending on the circumstances on the selected chart
- Custom Indicator – a technical indicator that is created by the user
- Script – a program that executed only once and it is indicated by the user
- Library – a set of a custom function that is used frequently
If you already have the programming experience switching to MQL4 will not be a big deal especially if you have programmed in C, since the language syntax is taken from that programming language. On the other hand, if you have not programmed in any programming language before do not give up. Learning MQL will not be an impossible task since there many good online resources available.
The programming course available at book.mql4.com, an official MetaTrader course, should be your starting point. It is free and offers a deep and concise explanation of the language and its programming concepts. A step to step guide, followed by many examples would help you to learn the language from scratch. However, programming newbies will probably need additional resources to learn the language.
Official MQL4 Reference is available at docs.mql4.com, it very useful resource that is dedicated to experienced MQL programmers. It offers a full explanation of all programming functions and procedures and has a lot of examples. As a programmer, you will use this recourse frequently especially when you will not be sure how to use certain program functions.
Apart from official resources there many good alternative ones available on the Internet. If you do not have any programming experience these types of resources will be of great help. Since my aim here is not to promote any I will just point out where you can find them and what you can expect.
Youtube is a great and free resource that offers many MQL video tutorials that are designed not only for total beginners but also for more advanced users. Step to step learning tutorials will help you to obtain new programming skills.
Udemy.com, an online eLearning marketplace offers many good MQL4 learning courses that can be purchased, depending on the course, for the price of around $200. Moreover, the platform is offering discounts on many courses, so you can find a good course discounted to $20.
The most effective but also the most expensive way to learn the MQL4 would be to hire the tutor. You can find many experienced MQL4 programmers on freelancing platforms like Upwork.com that will be willing to mentor you. A personal approach is guaranteed and especially if previously you did not have any programming experience this will be the fastest and the most effective way to learn MQL4. The cost of hiring the mentor depends on his programming and mentoring experience, it can vary from $20 per hour to $50 per hour.
Finally, remember becoming a good MQL programmer is a process that takes time and by the time I mean practice. Reading the book or watching the video tutorial will not make you a programmer. When you are taking your course it is important to try and understand all examples for yourself and if you take this approach, soon you will become a good MQL programmer.