Automated Trading: The Rise of the Machine

As we all know, the Forex markets can jump around like a squirrel on speed
and it’s open for trading 24/5.5. So, it’s pretty much impossible for any one
trader to take advantage of every trading opportunity that happens during market
hours, unless of course you are (or employ) a machine. This desire to trade
around the clock is spawning a market-wide interest in automated trading, or as
I like to call it “The Rise of The Machine.”

The trading industry has long focused on providing their customers with
strategies. Take any major trading software and you will find a slew of
“plug-ins” and “add-ons”, with the names of Elliot Waves, Bollinger Bands,
Candlestick Patterns and many others. These “Add-ons” will display signals,
sometimes recommendations, on the end user’s charts. But one still had to pull
the trigger, the program went only as far as telling you what to trade, what
stop loss and profit target to use but never actually executed the trade. In the
last few months far more attention has been given to “Automated Trading”. Only a
handful of trading platforms offer this technology as of today. I personally use
Interbank FX trader 4.

So, What is Automated Trading?

Automated Trading is the ability to let your computer place trades based on
your trading strategy. In Interbank FX trader 4, automated trading is done
through what we call an “Expert Advisor”. An Expert Advisor is the program you
attach to a chart that executes trades for you. The machine isn’t infallible,
there are a few limitations.

The Expert Advisor relies on your computer to be running and connected to the
internet.

And you should take measures to prevent power failures, disconnects and other pc
related problems. Don’t worry too much, just take some basic precautions with a
few simple fail safes.

First and foremost however, your Expert Advisor has to be programmed. If you are
not a programmer do not despair, many are available for hire. Whether you have
some basic programming knowledge or not, I highly recommend that you to take
some time and try learn the language. Many tutorials and sample codes are
available all over the internet.

Why use automated trading?

No matter how you first learned about trading, you will have come across the
same, over worked idioms; Do not use emotions in your trading, namely greed and
fear.

Always set a stop loss and a profit target.

Execute trades quickly, etc.

Bear all these in mind and take some time and think through your trading
system carefully. And then think through they system again. Carefully
considering all the possible outcomes is key to the best possible system. Your
Expert won’t make adjustments for market volatility, nor will it take every
eventuality into consideration unless you have already thought every scenario
through and made decisions about what you would like your Expert to do. On the
other hand, an Expert Advisor will not modify a stop loss because it believes
the market will turn around and try to give its trade one last chance
(subsequently breaking the bank). Nor will it modify the profit target of a
trade because suddenly it thinks it can make more money. The execution is done
within seconds, the program won’t second guess itself … it sees a signal and it
places the trade.

There are other interesting facets to automated trading. It is not just about
eliminating counter productive emotions. If you have been in the Forex game for
any length of time, you know as well as I do that some nights you have a hard
time sleeping. You have placed that one trade that can bring you riches or kill
your account and are up fretting and watching charts in a cold house with
scratch eyes. With an Expert Advisor attached to your chart, you sleep without a
care knowing that your program can identify trading opportunities, set trailing
stops, and profit targets. No more late nights spent worrying about your trades.

This brings up yet another advantage, you are trading while sleeping, yet
your strategy could trigger many signals and make profit during times you could
not trade at before. You are no longer limited by that pesky need to eat, sleep
and socialize with the family.

Another interesting benefit of employing a computer in your trading is that
you can program your expert to scan for opportunities on any and all available
currency pairs and periodicities. No longer will you need to open 15 charts to
make sure you don’t miss out on a good trade, an expert advisor can make sure
you see any available opportunity and trade them for you.

Automated Trading has brought to light new strategies that would never have
worked in the past due to human limitations. A concept often use to describe
trading, is that trading is like gambling at a casino but that you can improve
your odds trading using technical analysis. Well on the same vein, let’s use the
saying “the house always win”. It always wins because it is always playing; all
the losses are outdone by the wins. In theory, if you had a strategy with 51%
accuracy and you traded for small profits/losses (a few pips, and I’m not
referring to scalping here) and traded very often (hundreds of trades a day)
then you would (“in theory”) make money every day. Only a computer program could
execute and manage hundreds of trades every day.

How to write an Expert advisor?

How does one write an automated strategy? A big mistake made by newbie’s and
seasoned traders alike is to look for an expert that was created by some other
party and try to see if it makes money or matches their own strategy. I
personally think of an automated expert not as my replacement or a money making
machine but more as my backup or substitute. If I can’t trade for any reason
(sleeping, working, shopping, etc …) then I will let my trusty substitute go in
for me.

I say it is a mistake for newbies because they do not try to learn how to
trade on their own, therefore do not understand the signals they get on their
screen. It must feel to them like some stranger is interfering with their
trading account. “Hey who is trading my account? What kind of trade is that? I
don’t get it.” If you don’t want to take the time to understand why you should
be placing a given trade, I would think you would be better off using a money
manager for your account rather than try to use some “highly acclaimed” expert
found on some forum.

As far as a being a mistake for a seasoned trader, well that is because by
now they should know better. A seasoned trader should already have a few
indicators, a few techniques he or she is familiar and comfortable with. They
may not realize it but they already are using a system, they just need to
logically think through all the eventualities and then program it.

What most programmers would tell anyone interested in automating their
strategy is to write down why they placed a trade on paper. Keep a journal of
your trades for maybe a month. See what trades were good, which were not but
most importantly record why a trade was entered. What did you see on the chart
that made you say, “I’m buying this many lots of this currency pair and will set
the following stop loss and profit target.” Every details count.

The programming languages are powerful and very flexible. You can decide to
only trades during specific hours, specific days. I even know of people who have
created experts based of moon cycles … Nothing is impossible as long as you can
specifically define it. Recently news trading has become very popular, some
programmers have created experts to read a text file containing dates and time
of news announcements and used that to trigger trades. It can be very complex
and quite frankly more complex than I think is necessary but I truly believe
that most strategies can be programmed.

How to test the expert advisor?

So now you have your expert, you programmed it (or someone did it for you)
and it is time to put it to the test. Many platforms will provide you with a
“back tester” or a “simulator” of some sort. In my opinion these should be
called “debuggers” but we will come back to this later. So you run your
simulation and get a fabulous little report. Regardless of what the final
numbers say (whether or not you have made and imaginary profit), I recommend you
only look at the trades. Did it place the entry and exit points according to
your strategy? If not spend some time adjusting the code to fix the errors, stop
looking at the profit. That brings up a common pitfall for programmers, curve
fitting … Do not get lured by some extraordinary results, stay the course and
stick to your original design. Same goes with bad results, do not just give up
on your expert advisor because the back testers results look really bad. At this
point in the design process you should only focus on getting entry and exit
signals to match your original strategy, nothing else. Do not “waste your time”
optimizing and curve fitting, it’ll only end in tears.

Once you have checked the signals and they are accurate, your expert is
ready. Now it is time to do a real test. Most Forex brokers will let you
download a demo account, my recommendation is to open such a demo account and
let your expert trade live for a month or so. No matter how great a platform
claims their “back testing” or “simulations” to be nothing will be as good as
the real thing. Run the strategy live on a dummy account. That is why I ask
people not to waste time curve fitting their systems and why I call the “back
tester” the debugger, because its only use should be to check that the signals
are accurate. The only people who care about “simulation” results are businesses
who are trying to sell you some “add-on” and are trying to prove it works.

To wrap this up, I will say that you will continue to hear more and more
about automated trading. It can be a tremendous tool to help you in your
trading, but as with everything you will need to do your homework. Never forget
though that a tool can not replace you nor should you expect it to. Take charge
of your trading.

Marilyn McDonald is the director of marketing for
online broker Interbank FX. She can be reached at marilyn@interbankfx.com.

Â