Hiring guide for MQL4 Engineers

MQL4 Developer Hiring Guide

MQL4, or MetaQuotes Language 4, is a programming language used to develop trading robots, technical market indicators, scripts and function libraries within the MetaTrader 4 trading platform. Developed by MetaQuotes Software Corp., MQL4 allows users to create sophisticated trading strategies and analyze complex data patterns in real-time. This high-level language supports object-oriented programming allowing developers to write automated forex trades and develop custom financial market analysis tools. Its syntax is similar to that of C++, making it easier for programmers familiar with C++ or other similar languages. It also includes built-in functions for managing trade orders and processing specific events like ticks or timer events.

Ask the right questions secure the right MQL4 talent among an increasingly shrinking pool of talent.

First 20 minutes

General MQL4 app knowledge and experience

The first 20 minutes of the interview should seek to understand the candidate's general background in MQL4 application development, including their experience with various programming languages, databases, and their approach to designing scalable and maintainable systems.

How would you create a simple Expert Advisor in MQL4?
To create a simple Expert Advisor in MQL4, I would begin by defining the special function 'start()' which is the entry point of every MQL4 program. I would then implement the trading conditions within this function using MQL4's built-in technical indicators and functions.
What are the basic data types in MQL4?
The basic data types in MQL4 are int, double, string, color, datetime, bool, and char.
How would you handle errors in MQL4?
In MQL4, errors can be handled using the 'GetLastError()' function which returns the error code for the most recent terminal operation. This can then be used in conjunction with 'ErrorDescription()' function to generate a textual description of the error.
What is the use of the OnInit, OnDeinit and OnTick functions in MQL4?
OnInit is called when the Expert Advisor is initialized or de-initialized. OnDeinit is called when the Expert Advisor is de-initialized. OnTick is called at every tick.
Describe the difference between 'OrderSend' and 'OrderClose' in MQL4.
'OrderSend' is a function used to open a new order, while 'OrderClose' is used to close an existing order.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

What you’re looking for early on

Does the candidate have a strong understanding of MQL4 language?
Is the candidate able to solve complex problems?
Has the candidate worked on similar projects in the past?
Is the candidate able to work effectively within a team?

Next 20 minutes

Specific MQL4 development questions

The next 20 minutes of the interview should focus on the candidate's expertise with specific backend frameworks, their understanding of RESTful APIs, and their experience in handling data storage and retrieval efficiently.

How would you use arrays in MQL4?
Arrays in MQL4 are used similarly to how they are used in other programming languages. They can be declared using the 'double' keyword followed by the array name and size, and elements can be accessed using the array name followed by the index in square brackets.
What are the different types of execution models in MQL4 and how do they differ?
MQL4 supports four types of execution models: Instant, Request, Market and Exchange. Instant execution sends orders at the requested price. Request execution sends a request to the server for a trade operation. Market execution sends a trade order at the best market price. Exchange execution is used on exchange markets.
How would you optimize an Expert Advisor in MQL4?
To optimize an Expert Advisor in MQL4, I would use the Strategy Tester which allows for the testing of different input parameters to find the most optimal combination. I would also look at implementing money management strategies and improving the algorithm's logic.
Describe the difference between local and global variables in MQL4.
Local variables in MQL4 are declared within a function and can only be used within that function. Global variables, on the other hand, are declared outside of all functions and can be accessed by any function within the program.
What are the different types of orders in MQL4?
In MQL4, there are two main types of orders: Market Orders and Pending Orders. Market Orders are executed immediately at the current market price, while Pending Orders are set to be executed at a predetermined price in the future.
The hiring guide has been successfully sent to your email address.
Oops! Something went wrong while submitting the form.

The ideal back-end app developer

What you’re looking to see on the MQL4 engineer at this point.

At this point, a skilled MQL4 engineer should demonstrate strong problem-solving abilities, proficiency in MQL4 programming language, and knowledge of software development methodologies. Red flags include lack of hands-on experience, inability to articulate complex concepts, or unfamiliarity with standard coding practices.

Digging deeper

Code questions

These will help you see the candidate's real-world development capabilities with MQL4.

What does this simple MQL4 code do?
Print("Hello, world!");
This code prints the string 'Hello, world!' to the Experts log of the MetaTrader terminal.
What is the output of this MQL4 code?
int a = 10;
int b = 20;
Print(a + b);
This code will output '30' to the Experts log. It adds the integer values of 'a' and 'b' and prints the result.
What does this MQL4 code do?
double array[3];
array[0] = 1.1;
array[1] = 2.2;
array[2] = 3.3;
Print(ArrayMaximum(array, 0, WHOLE_ARRAY));
This code finds and prints the maximum value in the array. In this case, it will print '3.3'.
What does this MQL4 code do?
EventSetMillisecondTimer(1000);
while(!IsStopped()) {
  Sleep(100);
}
This code sets a timer to trigger an event every 1000 milliseconds (1 second). It then enters a loop that will only exit if the expert advisor is stopped, sleeping for 100 milliseconds on each iteration to prevent the CPU from maxing out.

Wrap-up questions

Final candidate for MQL4 Developer role questions

The final few questions should evaluate the candidate's teamwork, communication, and problem-solving skills. Additionally, assess their knowledge of microservices architecture, serverless computing, and how they handle MQL4 application deployments. Inquire about their experience in handling system failures and their approach to debugging and troubleshooting.

How would you implement a trailing stop in MQL4?
To implement a trailing stop in MQL4, I would use the 'OrderModify()' function to update the stop loss level of an order whenever the price moves in a profitable direction by a specified amount.
Describe the difference between 'OnTick' and 'OnTimer' event handlers in MQL4.
'OnTick' is an event handler that is called whenever a new tick is received for the symbol the Expert Advisor is running on. 'OnTimer' is an event handler that is called after a specified interval of time has passed.
How would you use graphical objects in MQL4?
Graphical objects in MQL4 can be created using the 'ObjectCreate()' function and can be manipulated using various other object functions such as 'ObjectMove()' and 'ObjectDelete()'.

MQL4 application related

Product Perfect's MQL4 development capabilities

Beyond hiring for your MQL4 engineering team, you may be in the market for additional help. Product Perfect provides seasoned expertise in MQL4 projects, and can engage in multiple capacities.