So far, we have discussed a few simple indicators, but there is more to a complete trading system than an entry indicator. You need to know when to exit, either at a profit or a loss, and how to size your position.
To build a Forex system, we recommend that you purchase trading software such as Tradestation. Trading software typically has a programming language to allow you to build a trading system and backtest it against historical data. You also need a large amount of price data for backtesting. We selecting trading software, obtaining price data and backtesting elsewhere in this website.
Most trading software gives you the ability to automatically tweak values during testing to automatically find the optimum combination of parameters. Be careful with this feature, you are aiming to build a system that works well in real life conditions, not one that is tweaked to work only for the conditions that exist in your test data.
When you design a forex trading system, simpler is better. You should avoid using more variables than is necessary. If you use enough variables, you can overfit your model so that it appears to work very well in backtesting, however it will not work well in real life trading.
One other important consideration is related to data frequency. If you have access to daily data, you may not see some significant intraday movements. For example, a currency pair may open at 1.1125 and close at 1.1175, and your system may have decided to go long, so you buy at the open and sell at the close. That is great, but how about if there was an announcement during the day and the market temporarily plunged to 1.015, before recovering?
Your system may have been stopped out, a long way from the expected stop loss due to market volatility and in reality may have recorded a loss rather than a healthy 50 pip profit. You need to take price movements within the day into account when designing your system.
An example of a simple trading system
This is an example of a very simple trading system, written in pseudocode.
It uses the Jurik Research JMA tool to smooth data (the parameters are not included here), and buys when the trend of the smoothed data is up, and sells when the trend is down. It automatically triggers a stop loss when there is an unrealised loss greater than twice the average daily volality of the last 3 days. In this way, the stop loss automatically adjusts to market conditions. The only thing it doesn’t do is specify the market to enter and the position sizing.Â It assumes a single contract and a single market.
Preprocessing of data: Smooth data using JMA
If smooth data(now) > smooth data(one period ago) then
If smooth data(now) < smooth data(one period ago) then
If Short and smooth data(now) > smooth data(one period ago) then
Buy to close
If Long and smooth data(now) < smooth data(one period ago) then
Sell to close
Stop loss rule:
If CurrentPriceÂ Entry Price > 2 x average volatility range for last 3 days then
Exit to close
Hopefully you will be able to use this as an example, and develop your own more refined system that meets your trading objectives. Good luck with developing and testing your own trading system.
Remember; the purpose if a trading system is to take away all emotions so you can buy and sell based upon potentially winning strategies that are based upon technical indicators. However, no trading system will run forever without adjustment. The market changes; your goals change, and your system needs to be kept current.
Perform frequent backtesting. Pay attention to your win/loss ratios, and don’t be afraid to make changes when changes are warranted. And never forget that : past performance is no indication of future returns.