Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

HOW TO CREATE AN EXPERT ADVISOR USING THE

EXPERT ADVISOR BUILDER APPLICATION

Create Custom Expert Advisors (Forex Robots)


-FULL TUTORIAL-

TRADING ANY FINANCIAL MARKET USING AN EXPERT ADVISOR

“An Expert Advisor (EA) or else a Forex Robot is a small piece of software that can trade automatically
any trading account. This tiny software works on a trading platform such as MetaTrader, JForex,
Tradestation, etc.”

Tips when trading using an Expert Advisor:

(1) Find a competitive Forex Broker (TradingCenter.org)


(2) Make sure your Forex Broker allows automated trading and scalping
(3) Backtest your Expert Advisor using the MT4 historical testing tool
(4) Test your Expert Advisor on a Demo Account before using it on a Real Account
(5) Join a Forex rebate plan to reduce your trading cost (Forex-Rebates.com)

» Expert Advisor Builder's Website


Specifications of the Expert Advisor Builder Software Application

The software application we are going to use in this tutorial is the online app Expert Advisor Builder.

Expert Advisor Builder is a pure web-based app without the need to install any software. The application is designed
as a tool of transforming ideas into fully automatic trading systems. The important thing is that there is absolutely no
need for any programming skills. Even if you don't know what an Expert Advisor is you will be able to build one in a
matter of days. What is very important too is that EA Builder is 100% free for creating indicators.

The application develops Expert Advisors that can be used in three platforms (MetaTrader4, MetaTrader5, and
Tradestation) inj order to trade any financial asset that is listed in these trading platforms (Currencies, Stocks,
Indices, Gold, Oil, etc.).

Although the application is built on a friendly graphical interface there are also tens of tutorials that can help traders
solve their problems, and that includes text and video tutorials.

■ Free application if you want to build indicators


■ 97USD if you want to create Expert Advisors

We suggest to start with the free application and then upgrade.

» Expert Advisor Builder Application

Other Important Functions

 Create alerts via Print Screen, eMail, and Audio


 Money-Management system building
 Time preferences
 Unlimited variables when developing Expert Advisors
 Full position sizing
 Martingale / Anti-Martingale trading techniques

» Expert Advisor Builder's Website


Creating your First Expert Advisor

In the following example, the Expert Advisor we are going to build is based on an SMA crossover.

Go to Expert Advisor Builder website » Expert Advisor Builder's Website


and sign-up (it takes a couple of minutes)

After, go to a new MetaTrader 4 Strategy,


open a new strategy, and name it MA Cross

Now you must add your condition.

Go to Add condition.

There are three available fields (LEFT, MIDDLE, RIGHT)


Insert Moving Average 5 periods on the LEFT field, on the MIDDLE choose crosses above, on the RIGHT insert
Moving Average 20 periods.

» Expert Advisor Builder's Website


Note: There is a significant difference between 'is above' and 'crosses above'.

• 'Is above' creates a continuous signal and that means that you will open an order for every tick, as long as the
moving average with period 5 is above the moving average with period 20

• Crosses above creates a unique signal and that means only a single order once at the crossover

After you have selected the right condition, click OK.

Tip: Click the magic button to create the opposite conditions for a selling order.

Now do the exact opposite in order to close the trade.

» Expert Advisor Builder's Website


Create the exact opposite order to close short positions.

In the Common tab, you can find additional options.

» Expert Advisor Builder's Website


In order to perform the right Money Management, insert the lot size. Note that 1 standard lot is 100,000 USD,
therefore, if you want to trade smaller positions insert the right lot size (0.5, 0.1, 0.05, etc.).

Now you can add also some alerts,


for example, you can check Audible Alerts in order to hear a sound every time an order is executed.

More money management options..

» Expert Advisor Builder's Website


That is all, the first Expert Advisor is ready as the source code is generated.

You can copy the source code and compile it on MT4..

» Expert Advisor Builder's Website


» Expert Advisor Builder's Website
Backtesting your First Expert Advisor

MT4 offers a very useful tool for performing historical backtesting.


Go to MT4, then Go to View -> Strategy Tester.

Now choose the Expert Advisor you have just created and test it (you may need to restart MT4).

Select any currency symbol, the time frame, and start the MT4 tester.

» Expert Advisor Builder's Website


As the price fluctuates, the MAs may cross upwards and downwards multiple times inside a single bar.
There is a solution for that.

Check the option Next Open Trade After (Common tab)


select for example 5 bars,

and,
Minimum Trade Duration also 5 bars

Now your Expert Advisor will wait 5 bars before opening the next trade or before closing the open position.

» Expert Advisor Builder's Website


Creating Inputs for your Expert Advisors

The first input is the time when pending orders are placed.
Go to your strategy and edit conditions...

Go to checkbox titled "Add to inputs".

And add the new input...

» Expert Advisor Builder's Website


Add any name...

Now the condition appears in the list of inputs.

» Expert Advisor Builder's Website


The number 10 has been replaced by the input name in violet.

» Expert Advisor Builder's Website


You can add additional time conditions...

» Expert Advisor Builder's Website


The next condition will be optimization of the Take Profit order (in Pips).

Add the new condition again to inputs...

» Expert Advisor Builder's Website


Adding the New Input...

And now replace the suggested name.

» Expert Advisor Builder's Website


Now Click OK three times.

The Take Profit value has been replaced by a variable name.

» Expert Advisor Builder's Website


And now optimizing the Trailing Stop order.

The number of bars determines how often the Stop Loss is moved. Add to inputs...

» Expert Advisor Builder's Website


Add the new input...

Now copy the source, replace the old source and compile it on MT4.

» Expert Advisor Builder's Website


As the Expert Advisor Builder team suggest, you can also experiment using the Average True Range indicator instead
of the number of pips.

Try the Expert Advisor Builder for free

■ Free application if you want to build indicators


■ 97USD if you want to create Expert Advisors

» Expert Advisor Builder Website

Websites for Automated Forex Trading:

Find Reviews of Forex Trading Systems (Indicators, Platforms, Expert Advisors):


■ ForexRobots.net

Rebate your trading when applying Automated Forex Strategies:


■ Forex-Rebates.com

Review Forex Brokers allowing Automated Trading and Scalping:


■ FxPros.net

» Expert Advisor Builder's Website

You might also like