Decompiling a file means to break open the compiled source code to view the contents. The goal of decompiling forex trading strategies expert advisors tutorial to access the original source in order to modify it in some manner.
4 files hold the original programming code in the MQL language. Programmers can access this file type in order to make changes to the EA or indicator. The computer does not save ex4 file information in human readable format. Instead, it compiles the code into a series of zeros and ones, called bits, that the computer reads in real time. The best analogy is to consider the idea of a game plan.
If you know that the opposing team’s defense moves slowly, you might try passing more frequently. You don’t know all of the specifics of how the game will play out. The purpose is to develop a general response to a set of circumstances. The ex4 file is the series of decisions made in the game that implement the plan to pass more often. The idea is ready to go, even though the individual plays could not have been known because they were in the future. When the plays develop, the players take the generic game plan and implement it in real time. Breaking the compiled ex4 file yields an mq4 file.
An expert advisor programmer can then take the MQL contents and make the desired changes. Many would be decompilers want to make harmless changes to a file. A successful indicator may predict the direction of the market, yet it may not generate alerts when it’s a good time to trade. New trading setup signals might save the user from staring at charts too long. Traders mistakenly assume that they need access to the source code to program an MQL indicator.
Some frustrated traders approach me with expert advisors that lose money hand over fist. They want to modify the file contents in the hopes of salvaging a potentially useful concept from the strategy. They want to decompile the ex4 to remove the licensing restriction on a product they rightfully own but that they can no longer access. I sympathize with the situations as both are common and ethical responses, in my opinion.
I suspect, however, that the legal issues with modifying a commercial EA, are not in favor of the customer. Then, there are the thieves that like someone else’s work but don’t want to pay for it. I unfortunately get this request all the time. Too many of the requests revolve around stealing other people’s work. It’s even better to encrypt the DLL. The MQL language was not written with anything in mind other than trading.
Going back and forth between the ex4 and mq4 formats is very, very easy. That is not, however, the same thing as the original mq4 file. The decompiled ex4 file strips the variable names and replaces them with new machine names. Good programming practices require naming variables after their purpose.