Tutorial - Start automatic trading
Last update: 27 April 2023
If you came here because you're starting the endeavour of building a trading robot: you've come to the right place! This tutorial will focus on building an EA using EA Builder Pro. You can build our example EA by following us in our footsteps, or you can make you own decisions, using the extra information provided by this tutorial.
When trading, you're placing orders at a broker. A broker usually offers a trading platform which allows you to send orders manually. One of the best of such platforms is Metatrader. Besides manual trading, Metatrader allows you to install a trading robot, called an "Expert Advisor" (EA). EA Builder Pro helps you build an EA with the greatest of ease (up to 10 times quicker than with our competition).
This tutorial assumes you've got Metatrader 4 or 5 installed and are fairly familiar with it.
If you're unfamiliar with Metatrader, we suggest you start by installing Metatrader from the Metaquotes website, because we are guessing you don't want to have to choose a broker right now, until you are setup and ready to trade on a demo- or live account. Metaquotes, the developing and publishing corporation of Metatrader, will offer you the trading platform and a demo account. We will get back to you about brokers later in another tutorial. We also suggest you follow the 'Introduction to Metatrader' course on the BabyPips website if you're unfamiliar with Metatrader.
How to create an EA using EA Builder Pro?
Let's get started! In this tutorial we will be creating the famous 'Cowabunga' EA. This EA will use the trend on the H4 (4 hour) timeframe to act as a filter and then look at the M15 timeframe for opportunities to go long or short.
Let's write down the entries/ exits, which we call 'Signals' as a general term for a collection of conditions for entries and exits.
- Open buy signal:
The filter for going long checks if the trend is up. The trend is up when on the H4 timeframe:
- the 5-bar EMA is above the 10-bar EMA
- RSI is bigger than 50
- Stochastic is moving up but not overbought
- MACD crosses up the 0 value or
- MACD is negative but just started going up
- Open sell signal:
The filter for going short checks if the trend is down. The trend is down when on the H4 timeframe:
- the 5-bar EMA is under the 10-bar EMA
- RSI is smaller than 50
- Stochastic is moving down but not oversold
- MACD crosses down the 0 value or
- MACD is positive but just started going down
- Close strategy (for buy and sell both):
We're going to set 50- and 00 price levels as our exit signals' target. So, if the price when opening a buy order is 1.09887, then we will target 1.10000, which is 11.3 pips up. However, if the target is less than 5 pips away only, we will change tactic and set the exit at the distance of the order's open price to the Parabolic SAR. So, if Parabolic SAR is 10 pips under the order's open price, then we will set the exit to 10 pips above the order's open price.
We will also set the stop loss to the value of Parabolic SAR when SAR is below the order's open price.
Well, that's quite something! The EA you had in mind may be less complicated than that. Actually 9 out of 10 trading strageties are less complicated than the Cowabunga strategy. However, we wanted this tutorial to show EA Builder Pro is capable of creating advanced EA's and at the same time make sure you learn enough to create advanced EA's yourself. If you just started building EA's and notice during this tutorial that you have questions and need additional help, please Subscribe and send us your questions. Now, let's continue!
Next: Part 1 : Get started.