What does a trader need the source code for?
The trading industry has changed a lot over the past few decades. The chalkboard and telegraph lines have been replaced by powerful computers and high-speed communication lines.
The toolkit of a modern trader
The main trader's tool has become a trading terminal. It is well known, that the largest and the most liquid financial market is FOREX. So, the most popular trading platform, which is used in the FOREX market these days is MetaTrader 4.
The volume of FOREX market trading is so large and the flow of currency pairs quotes is so rapid, that the traditional manual trading can no longer be as effective as it was in the 20th century. This is where trading robots come in. They are special programs that execute trading algorithms and make deals on the financial market without human involvement.
Trading robots work in MetaTrader environment and are implemented in MQL4 programming language. Programs written in this language are compiled directly into the machine code. Because of this they have a very high speed.
In most cases, traders do not write such programs by themselves. This is done by highly skilled programmers. They work according to the specifications created by the trader, based on his or her trading strategy. This is an ideal case.
However, in practice there are often cases where traders use trading robots obtained from third party vendors.
The black box problem
These days, it is easy to buy a ready-made trading robot. Such offers are not only found on specialized forums, but even in Facebook ads.
Sellers of trading robots are very convincing. Sometimes they even show trading reports - lists of trades that the trading robot has made in the past. However, this is not known to be a guarantee that these trades will be repeated in the future.
When buying a commercial trading robot, a trader comes across the fact that he/she does not know the algorithm used to make trades. This is commonly referred to as a "black box problem".
The seller of trading robots often forgets to attach the source code to their products. Because of that the user does not know what to expect from such a product.
The solution exists
Executable files of MetaTrader 4 trading robots contain binary code (similar to .exe files) and have the EX4 extension. Sellers of trading robots assure customers that .ex4 file is enough to run a trading robot on a user's computer. This is indeed true.
However, it is very important for any skilled trader to understand the trading algorithm your Expert Advisor is based on. It is also important to be able to modify it, because the behaviour of financial markets is also subject to change.
In order to meet these natural needs, a trader must have access to the source code of a trading robot. For MetaTrader this means a file in MQ4 format. What should you do if the developer has not provided this file to the trader for some reason?
Here the only solution is decompilation. Decompiling is the process of recovery of the source code in the MQL4 programming language from an executable EX4 file. This is a very complex and time-consuming process that requires a lot of skills and experience.
More details about decompiling EX4 files can be found here.