Why Coding in MQL4 is Easy?

Why Coding In MQL4 is Easy?

For many people coding is a term from the other world reserved only for a narrow, nerdy and eccentric group of human beings. But is it really? I truly think that it is not, moreover I strongly believe that anyone can easily learn the basics of programming and start to write his first real-life programs within two weeks, especially in MQL4. And here is why!

MQL4 is a High-Level Programming Language

High-level programming language is meant to be easy to understand by humans. Syntax and keywords are similar to normal language which makes it simple to code and grasp. As an example, in MQL4 when programming a trade management feature to send an order to terminal, we simple use a function OrderSend(). If we want to close an order? OrderClose() function will do the trick. Easy, right?

Build-in Basic Indicators and Functions

Build-in functions and basic indicators are single, most important elements of MQL4 programming. At the same time, they really make coding painless and uncomplicated. What functions are? They basically are blocks of code designed to do a specific thing, i.e. send an email, print a message or add a stop loss to an open trade. The beauty of MQL4 is that you don’t need to code them by yourself, they are already there ready to use.

Build-in indicators are extremely useful when programming trading robots. When you need to use moving average, ATR, Stochastic or other well-known technical indicator in your strategy you can do it with a single line of code. As an example, iStochastic keyword will calculate Stochastic indicator value – easy and almost effortless, isn’t it?


You don’t need to use any expensive, high-end 3rd party IDEs (Integrated Development Environment) to start writing in MQL4. All you need is the MetaEditor which goes together with a free MetaTrader installation package. In my opinion MetaEditor is a great IDE, packed with many useful features, tools and options. It makes coding in MQL4 organized and easy.

You Only Need Basics to Start Coding

Yes, you absolutely don’t need to know everything about MQL4 by heart to be a good programmer. You only need basics! General knowledge of how MQL4 works, syntax of language, key functions and loops is enough to write any, even advanced programs. Rest you will find on the internet.

Everything (Almost) is on the Internet

If you stumble on something difficult, it is very likely that someone else had already the same problem. Simply use google and you can be sure to find a solution (or something close to it). MQL4 website and forum is also a tremendous help. You will find there a complete documentation of MQL4 language, sample usage of functions and much more. And that is why you don’t need to know everything, you just to need know how to look!

So, it is not that hard to code in MQL4. With proper state of mind, ability to use google and a bit of effort and self-discipline, you will create anything in MQL4 which will make your trading less difficult and more profitable.

About Lukas

Trader and programmer. Passionate about trading automation. Spent 5 years working in BNY Mellon, Citibank and MAN Investments. Currently self-employed in IT business. Has a stock broker license.

View all posts by Lukas →

Leave a Reply

Your email address will not be published. Required fields are marked *