A mechanical trading system that can consistently beat the market – this is the Holy Grail for some traders. The idea of automatic profits is obviously attractive, but is it possible? In short, it is, but it’s not easy to do. In this post, I’ll give you guidelines to create your own system.

What Is A Mechanical Trading System?
Simply put, it is a technique that makes trading decisions for you! You input the trading data, and your system generates a response that indicates the appropriate action. You buy, sell, or do nothing depending upon the formulas that your system uses. And you’re left with no decision to make, except how to spend your profits of course! But we’re a long way away from that stage yet.

How Do They Work?
Mechanical systems are reactive by design. They assume that if a market acted in a certain way before, it will continue to act that way in the future. Now this won’t always be the case, but the aim is to find a pattern that repeats itself frequently enough in the future that your system will profitable overall.

How To Create A Mechanical Trading System
Your own system can be as basic or advanced as you like. Crucially you can adapt it your own situation and needs. The process of developing one should follow these general steps:
Step 1: Select timeframe
Step 2: Define entry rules
Step 3: Define exit rules
Step 4: Backtesting

Step 1: Select timeframe
First choose the price timeframe for your system. The seven major timeframes for traders are 1min, 5min, 10min, 15min, 30min, 60min and daily. I recommend that you choose only one of these timeframes instead of trying to work your system though all of them.
As a general rule, the shorter the timeframe, the lower the average profit per trade, the lower the risk and the greater the number of trades. It’s up to you to decide which timeframe suits you the best. For example, a day-trading pro may trade off a 5min system but someone who can only make it to the trading screen once a day may prefer a daily system.

Step 2: Define entry rules
There are literally millions of different entry rules that you could concoct. But they all fall into two broad groups: trend following rules and reversal rules.
Trend following systems try to capitalise upon an established trend in a market, and might be based on indicators like Moving Averages (MA) and Directional Movement. An example rule could be to go long when the 50 period MA crosses the 200 period MA from below and go short when the 50 period MA crosses the 200 period MA from above. The logic here is that a potential trend is starting if the fast moving MA crosses the slow moving MA from below.

Reversal systems, on the other hand, try to identify a change in the direction of a market and capitalise upon this. Oscillators such as RSI and Stochastics are often used here. A simple rule could be to go long when the RSI hits 25 and go short when the RSI hits 75. The thinking behind this is that if the RSI hit such an extreme level, then it would be oversold/overbought and prime for a reversal.

Compared to trend following systems, reversal systems tend to have a shorter trade duration and more of them. Reversal systems tend to be more suited to people who are more active in the market.
To find potential entry rules that are suited to you, you could test out the many indicators that are on paddypowertrader’s charts. Also many internet trading forums (e.g. Trade2Win) have sections dedicated to mechanical trading system rules where you can find plenty of ideas.

Step 3: Define exit rules
Now that you’re in a trade, you need to define rules to get back out of it. There are two general rules that you need – a stop loss order rule to protect your capital and a limit profit order rule to realise profits.
Five basic methods for setting exit rules are:

  • Fixed euro amount (e.g. €2,000),
  • Percentage of capital (e.g. 5% of funds),
  • Percentage of the current price (e.g. 1% of the entry price),
  • Percentage of volatility (e.g. 100% of the average daily movement),
  • Time (e.g. exit after 3 days).

Getting into more detail, you could combine these methods. Maybe set a stop loss order at 3% of capital, a limit profit order at 3% of the entry price and a time rule to close the trade after two days if neither of the orders have been hit.
Step 4: Backtesting
Now that the rules of the mechanical trading system have been clearly defined, you should backtest it over historical data to see if it is any good. The results obtained from backtesting will provide an indication of the system’s profitability over time.

A starting place to backtest is the paddypowertrader charts. Manually look through different charts on your chosen timeframe and have a look for places where your entry rules are hit. Then follow that trade until one of your exit rules is hit. Jot down your profit/loss and start looking for another time your entry rule was hit. After a while of doing this, you should have a good indication of whether your system will be profitable or not. If you want to develop more complicated rules and automate your testing, you may want to get some backtesting software e.g. AmiBroker.
You can also slightly tweak your rules in the backtesting stage to improve them. For example this could mean changing your stop loss order to 4% of capital instead of 3%. But don’t get lured into trying to “curve-fit” your system!

The Galloping Zebu is a regular contributor to the http://www.paddypowertrader.com