How to create an advisor MQL4?
Dear trader, have you ever thought about how to create an Expert Advisor MQL4? It was set up, and not ordered from a professional programmer. In fact, the problem is not so complicated. And the benefits are obvious: Save on freelance services and the opportunity to further build your own trading advisors. Skill-it's not going anywhere! This is not to mention the pleasure of what you have created a working adviser MQL4, which could potentially make a profit with Forex automatic.
Ready can download the best forex ea in the world.
Begin to create Advisor MQL4
To start, you need a basic knowledge of programming language MQL4. Download the book with a description of the basics of the language here
Also beginners will help MT4 (called the F1 key in the terminal) and reference editor MetaQuotes Language (press F4 in the terminal MT4, then F1).
You can disassemble the finished program - which commands are used, how they work, etc. And you can begin by writing a simple trading algorithm to further the finished "skeleton" to impose new commands or change ready. Ie from the simple - to more complex.
Also, when you create a trading robot is definitely useful tips and tricks of the traders (programmers) who already have some experience in this matter. You can find a lot of useful forums for traders who use language MQL4 (www.mql4.com/ru) or MQL5 (www.mql5.com/ru). Here you can get an answer to almost any question related to the writing of trading advisers and not only.
Advisor MQL4 - advice from experienced programmers
* As soon as the opportunity to do the testing of the finished piece of code or function - do it immediately. Later, when the program will grow to large sizes, will be harder to make sure that it works.
* Pieces of code that are repeated often better to arrange the individual functions.
* No need to strive to write optimal code. To begin, create something that will work properly - even if the code is ugly or bulky. Subsequently, the corrected code optimization.
* Do not be shy to use their own algorithms, despite having prepared or seemingly more perfect you. Priority - the correctness of the program, which is impossible without an understanding of how to operate a particular algorithm. You have created algorithms more accessible and easier for you optimized.
Write indicator or expert, knowing the MQL4 language and built-in functions - pretty simple. Another thing is whether all work properly? Debugging the finished program takes a lot of time, because MT4 has no debugger (debugger), or debugger programs.
The debugging process is reduced to uninteresting manual review trading results expert, viewing logs and subsequent correction code. If an advisor MQL4 simple and has several teams, wherever you went. But there are also complex MTS (Mechanical Trading Systems) with a great many thousands of interline program code.
So really working trading programs should be easy - especially for understanding. The higher the chances that it will be correct to trade adviser for a given algorithm.
In addition, the creation of an expert - a creative process. It all starts in the head, and then fall line of code in a file on your computer. Then there is debugging, performance testing and optimization program.
Create adviser MQL4 - simplify the process
Simplify your task in two ways. First - use predefined blocks (library functions) by you or any other trader (programmer). Second - use of special programs.
For the first method suitable part of the code that can be found on the above forums, or created by you. The main thing - you need to understand how this piece of software. And then the trick.
The second method uses alternative programs that simplify the process of creating adviser MQL4. It is something like Wizard applications Windows - each step is described and available to understand, even for those who are not programmers MQL4. Appreciate the advantages of this method can follow the links below:
As you can see, is not so difficult. Most importantly - learn the basics of the language MQL4, the rest will follow. With a little practice - and you create your own advisor MQL4. Then another, and another ... And before you a new perspective! Good luck, and remember that the gains from trade is highly dependent on the chosen broker!
Go back Benefits without swap account / Next article Forex Trends 2013