A Guide to Automated Trading Systems

The hardest part of creating a profitable expert advisor is coming up with a great mechanical trading system. Starting with a well-defined and profitable trading system will make the development process go a lot smoother. But creating your own trading system is not as easy as it sounds.

I've seen many trading systems that looked good in theory, but performed poorly both in testing and trading. This is usually because the trader did not take the time to thoroughly test their system. Novice traders are especially prone to developing trading systems that look good on a chart, but end up unprofitable when developed into expert advisors.

Obviously, you'll want to avoid paying for a EA that is unprofitable and unsatisfactory. This is why it is so important that you submit a profitable trading system, one that is based on sound technical trading principles and has been throughly tested and tweaked.

Trading System

Your trading system does not have to be original. You can get trading ideas from books, websites or trading forums. Unless you've been trading Forex for a while, that trading system you concocted using some indicator you found online is probably not going to be very profitable, at least not without some testing and revision.

Keep your trading system simple. Complex trading systems are rarely more profitable that simple ones, and are always more expensive to code. Conversely, a trading system based on a single indicator is not a very good idea. Try adding another indicator to help filter out unprofitable trades -- for example, an oscillator (such as stochastics) added to a trend-following indicator (such as a moving average).

Take the time to learn how your indicators work, and how they are commonly used in technical analysis. You may derive some great trading ideas this way. Good sources for technical indicator research include StockCharts.com and the Metatrader technical indicators reference at MetaQuotes.net. While you're at it, read all that you can about technical analysis and Forex trading methods.

A good method for creating your own trading system is to take an existing system and improve upon it. For example, the moving average cross is a simple and classic trading method that offers plenty of room for improvement. Adding an oscillator such as a stochastic is a great way to filter out trades and increase profitability.

A free moving average cross EA is available for download from this site. We encourage you to come up with your own improvements to the moving average cross system, and we'll create for you a custom moving average cross EA to your specifications.

Testing

The only way to determine whether a trading system is profitable is to rigorously test it. You can do this by demo trading the system in real time, or by manually backtesting and recording your results. But these methods can be inaccurate and time-consuming.

Automated testing is the quickest and most objective way to evaluate a trading system -- but it can't be done in MetaTrader without coding an expert advisor first. Fortunately, there is a solution that doesn't require any programming knowledge.

The excellent (and free) Forex Strategy Builder is a great way to perform automated testing of trading systems using real market data. It includes many common indicators and conditions for opening and closing orders. You can find the online help system at Forex-Help.org.

I strongly encourage you to use this program to evaluate your trading system before submitting it for development. There are a few systems that cannot be tested using this program -- those that use uncommon indicators, for example. In this case you would have to carefully and manually backtest your system by hand.

Disadvantages

All trading systems have weaknesses. A trend-following system such as an moving average cross will lose money when the market is ranging (i.e. not trending), whereas a counter-trend system -- such as an oscillator that trades at overbought and oversold conditions -- will lose money during a prolonged trend.

The major drawback to automated trading in general is that trades can be placed at unexpected times -- too soon, too late, or in the wrong place altogether. If at any time during the execution of the program the condition becomes true, even momentarily, the order will be placed. If the condition is not 100% true, the order is not placed, even if it was otherwise a good spot to place a trade.

For indicator-based systems, you can alleviate this somewhat by evaluating conditions only at the open of each bar. This will prevent short price spikes from triggering trade conditions, at the expense of opening orders a little later. Your EA will come with a setting for you to easily enable this feature.

Refining your order conditions to filter out unprofitable trades can help too. Try adding conditions that can help increase the probability of winning trades, and be sure to test them throughly. No matter how good your trading system is, there will always be unexpected trades that result in losses, so don't make your trading conditions so specific that you're giving up profits to avoid losses.

The definition of a good trading system is one that consistently makes money over the long term, in a variety of market conditions, with a minimum of risk. If your system relies on large lot sizes (more than 5% of equity on the same position), zero stop losses, or very favorable market conditions, you may find yourself wiping out your trading balance.

If too many trades are resulting in losses or your system is unprofitable most of the time, then it's time to head back to the drawing board. If your system is not performing to your satisfaction even after several revisions, don't be afraid to scrap it all together and start over. It can take many tries to find your holy grail -- and you'll learn a lot about trading in the process.

For more advice, read my Six Commandments of Great Expert Advisors, a list of what not to do when ordering an expert advisor! Also see An Expert Advisor Made to Order at mql4.com.

2008 EasyExpertForex.com