How to Create EA from Scratch
Steps that you need to follow to create EA from a trading strategy.
With EA Studio it is easy to create EA even if you don't have any experience.
1. Set Your Account
Just as creating a demo account in a Forex broker, you need to set up an EA Studio account. Go to Tools from the main menu and click on Settings. Then select the preferred Account Currency, Initial Account Amount, and Leverage.
It is vital to have the same settings both in EA Studio and your broker account so that their results match at a later point.
2. Import Data from MetaTrader
We provide at your disposal Data Export Scripts which you can use for your MetaTrader platforms.
Follow the steps:
1. Open the EA Studio and choose Data from the top menu bar.
2. Then download the script for your trading platform (MetaTrader 4 or MetaTrader 5)
3. Go to MetaTrader File/Open Data Folder/MQL4 or MQL5/Scripts and paste the Data Export Script file.
4. Go back to MetaTrader and right-click on the Navigator box. Then click on Refresh.
If you are using the MetaTrader 5 platform, you need to follow a few more steps:
1. After you have added the script in the Navigator, you need to right-click on it and choose Modify.
2. Then you will see a text editor opening. Go to the top menu and click Compile.
3. Then close the text editor.
How to run the Data Export Script and Import Data
1. Attach the script to the chart.
2. Open MetaTrader and go to File/Open Data Folder/MQL4 (or MQL5)/Files.
3. There you will find all the files which the script has exported.
4. Navigate to EA Studio/Data.
5. Drag and drop the files to the EA studio and they will be uploaded.
3. Generate Strategies and Create EA
- If you would like to build your own strategy from scratch, you need to go to the Editor (by clicking on Strategy from the menu tab) and choose the entry triggers.
- If you prefer to create a strategy automatically, feel free to use the Generator. With the help of its advanced backtesting algorithm, the Generator uses a set of rules (Acceptance Criteria) and it finds the most logical criteria for the strategies. You will be able amazed to find out how easy it is to create EA with the Exper Advisor Studio.
4. Choose a Strategy from the Collection
The more time you give the Generator to work, the more strategies it will create for you. The most efficient ones will go to the Collection. You can get access to them simply by choosing Collection from the top menu bar.
The strategies will be listed there and their equity curves will be displayed which will help you choose the right ones to trade with. You also have the option to apply various filters on them.
5. Analyzing the Trading Rules and Statistics of the Strategy
If you want to examine any of the strategies in the Collection, just click on it and it will open up in the Editor.
There you can play with the settings, change any of the Entry Rules, and the indicators parameters.
The most valuable information is shown in a table on the right side. The balance and equity charts are situated below these statistics. The presented information enables you to assess the strategies fast and easy. In case you want to have a deeper look at the full backtest results, you can go to the Report.
As soon as you are happy with the strategy, you can export it directly as an Expert Advisor. Your first created EA will be ready to be used on a demo account.
6. Export an Expert Advisor
In order to export an Expert Advisor for your MetaTrader platform (MT4 or MT5), click on the Expert Advisor button on the right of the top menu bar.
7. Test an Expert Advisor with MetaTrader
The Expert Advisors are written completely on native MQL code and they don't require any additional coding. When you compile them in MetaTrader there will be no errors or warnings, which makes the work with them very efficient.
Follow these steps in order to test an Expert Advisor:
1. From your MetaTrader platform go to File/Open Data Folder/MQL4 (or MQL5)/Experts and paste the Expert Advisor.
If you have MetaTrader 5, then you also need to:
- Right-click on the Expert Advisor (which is in the Navigator) and choose Modify. You will see a text editor opening.
- Click on Compile on the top menu and then close the editor.
2. Go to the MetaTrader Strategy Tester from View/Strategy Tester.
Then you can run a test on the Expert Advisor by filling the correct Period, Symbol, Time Frame, etc.
It is important to compare both backtesting results since they need to match.
The Expert Advisor Studio is an exclusive online platform for creating trading strategies. The whole process of generating, optimizing, and validating a strategy is 100% automated.
Join Us and Learn to Create EA Like a Professional
You are welcome to become a part of our friendly trading community! Please, visit our Forum for more valuable and detailed information regarding algorithmic trading.