Community Forex Questions
How to write an Expert Advisor in MQL4 or MQL5?
In order to write an Expert Advisor, you must already have a trading strategy. When we have a formal algorithm, we can start implementing the idea. In itself, code only provides language tools for implementing a certain idea.

The first thing you need is a working trading strategy. It is not the subject of this article to explore how it can be developed, so let's look at something simple as an example. Assume the following. There is a possibility to open deals in opposite directions with narrow limits during periods of low activity of the instrument "on a flat". You will be able to capitalize on small sideways market movements and profit from them.

No matter which language version you select, the initial steps are the same. You need the MetaTrader Client Terminal, which includes MetaEditor, in order to write programs in MQL. In the Trading Terminal, we can now launch MetaEditor directly from the working directory or through the main menu, Tools and MetaQuotes Language Editor (F4). The File -> New command can be found in the MetaEditor menu. Pressing the "New" button in the graphical menu does the same thing.

Add Comment

Add your comment