Expert Advisor(EA):MQL5 Trading Robots Development Part 1

Table of Contents


Download trading software from

Once you get the software installed, you can see two icons on your desktop.

Trader and code editor

You can click either button to get your coding started. If you open the trader, you can open the editor from trader by clicking the book-like button circled below. Moreover, if you already set your robot trader up, you can enable the autotrading by activating the “AutoTrading” button which I will talk this in detail.

Login and location of editor

Your first trading robot

Once you opened the editor, right click files in Experts and New File button.

N.B. If you right click on Experts, you can get your file somewhere else.

Tick on the Expert Advisor and click Next

Fill your trader name, your name and website. Also, the parameters is optional. Those set parameters can be modified via the trader window thus no need for changing the code.

You can tick on those options which will give you an empty function in the code template. Here we leave it unticked and click next.

After all those procedures, you can get a sample code like this. We will build our robot trader from those simple scaffolds.

You can compile this empty file. Then you click the Compile button.

Then open the trader and enable Strategy Tester from View in the menu.

Now you can see your trader now. You can leave the options in default and click Start. However your code will do nothing cause of no action in your code hence an horizontal line will be generated meaning no fluctuation on your virtual fund.

In the next blogs, I will talk about how to develop a robot trader that can achieve a profit curve like this. Furthermore I want to mix EA with Machine Learning to create a more robust trader.

Leave a Reply