Home | MQL4 Tutorial For Dummies | Blogs | EA Builder Blogs
Memberships Login | MQL4 Course | Community | Contact Us

Introduction to MQL4 Programming

January 14, 2018 admin 0

Before you start any programming, you should know the origin of MQL4. What You’ll Learn In This Post What is MQL4 What MQL4 can do or cannot do What are the MQL4 applications that can build MQL4 or known as MetaQuotes Languages 4 is a script based command written by MetaQuotes Software corporation. Below are the feature of MQL4: It is to help forex trader to create own robot to manage the trade, which includes create trade, modifying trade, and as well as closing the trade. MQL4 embeds all the features that you can used in MT4, such as indicators (moving average, RSI (relative strength indicator), MACD) It can also helps to automatically update MT4 objects such as (fibonacci, trend line and more) It inherits all the behaviors and limitations from MT4: Account lot size limitation, buy stop and sell stop limitation from the price, and buy limit and sell limit limitation from the price. MQL4 is just a set of English words to form a series of commands. Imagine that, you learn a set of hand gesture commands to command your dogs to stand up. In MQL4, MQL4 are the special commands that are written in English, a set of MT4 commands to order MT4 to work accordingly. Sound simple right ? You just need to learn the commands to give order to MT4. MQL5 is a accessor of MQL4. Nevertheless many of the Forex broker is still using MQL4 and it is popular among the forex broker due to stability. MQL4 has a similar concept of C++ programming which is using object oriented. It is easy to be used and written as all the syntax and functions are well defined and documented in the MQL4 documentation. Having says that if you are a C++ programmer, then this will be a piece of cake for you. You can go ahead to program your EA. Nevertheless, for most of the Forex traders, you have no programming background. Before you start program, you might have fierce to learn how to write. But I can guarantee you, MQL4 is not that hard to learn. You do not need to learn all the functions / syntaxs / object oriented in MQL4 feature. From my 10 years programming experience, you just need to know the core of the programming and learn what you need to do. For example, if you want to learn how to analyse the different symbols of the markets, then you should learn the indicators. On the other hand, if you want to learn how to create your on bot for trading, then you should learn the skill to create an EA (Expert advisor). In short, if assume that there is 100% of the knowledge of MQL4, but you just need to learn 50% of it than you are fine to create your own robot. You do not need to learn all the technical terms. Just to be keep in mind of it. Learn what you need. Same set of MQL4 commands can be built for 3 main purposes: Expert Advisor or EA or Robot Expert Advisor is a sets of commands that will check on your trading criteria on each of the price changes. In MQL4, the price changes is called Tick changes. On each tick changes, then your trading criteria will be checked if it is matched and perform actions. So, your task is to rovide a set of criteria on the EA in order to perform actions on your trade, i.e. open a new trades. Indicator For trader who want to write indicators to draw own lines and objects on the chart to ease the analysis work. Then indicator is the feature you should look into. Take an example of moving average, if you want to create own line like moving average with your own mathematic algorithm, then you should write your own indicator. Then indicator could be shown in the chart. Script Script is a one time used command execution. Unlike EA / Expert advisor, the checking will not be repeated on each price changes. Script will only be executed once on appended to the chart. In the scenario where you want to check all of the symbol for each of the day and generate report, then you should use script to help you execute the tasks. Or if you have a script to help you close all of the active trade in your list without any hassle to close it one by one, especially during the critical time, then you should use script. So these are the introduction of the MQL4 for a MQL4 newbie. Have a look in other post to learn and understand more on MQL4. I have described this in video as well Post Views: 1,109