Important Technical Issues in Forex Trading System Development

When I started my journey in Forex automated system development more than 5 years ago I was unaware of many issues that made system development for this market particularly hard. Many of these issues are unique to the Forex market while others are issues with general strategy creation. Failing to be aware of these problems causes many people to develop strategies that are unreliable and that end up costing them a significant amount of money. Today I want to share with you some of what I have learned through my journey in system development, especially all the problems I became aware of as I gathered experience in the development of trading systems. Accounting for these issues in your own development will probably save you a ton of time and increase your chances of being successful at this game. Here are what I consider are the most basic and important technical problems with Forex system development:

2014-11-25_8-46-11

 

Candle structure: Different Forex data feeds have different weekly starting/ending times which causes differences in the number of candles per week and therefore differences in the overall candle structure. This means that a broker which starts the week at 22 GMT on Sunday will have 2 more 1H candles at the beginning of the week than a broker that starts the week at 0 GMT on Monday. In practice this means that a strategy has a very good chance to give different results across two brokers with varying weekly starting/ending times because the relative position of past candles against the present candle is different on both. Imagine we calculate the 100 period simple moving average on the two brokers mentioned above, the broker that opens on Sunday has 2 additional candles, therefore the 100 period SMA will be always be different whenever a week start/end period is included. For this reason it is very important to ensure that your candle structure matches between your back-testing and live trading data. This may be done by refactoring the data to make sure your system always uses a coherent candle structure.

The market opening times have DST: When developing trading strategies it is often important to consider market opening/closing times because these times play important roles within daily volatility cycles. It is therefore necessary to account for this when giving your data a timestamp to use for trading. Due to this reason it is usually more useful to trade using a set of data which is adjusted with DST as this accurately reflects DST changes on the desired market opening time. This is a reason why finding strategies that trade successfully with entries on one given hour is harder if using data with a fixed GMT shift while ignoring DST as the data is only reflecting market opening times accurately half the time (either on DST or non-DST time depending on the GMT shift). Correcting both your broker’s live trading data and your back-testing data to account for this is an important part in the production of more reliable trading systems.

Trade chain dependency: Every trading system has a set of entry rules that define when to enter a trade. Accounting for these signals selectively leads to an issue that I call trade chain dependency. Imagine you have a system that receives a long signal, therefore you open a long trade with a target SL and a target TP of 50 pips. However after 5 hours your system receives another entry signal and price has now moved 10 pips against you. If you ignore this signal it means that a person who started trading the system after your first signal would have entered a different trade when compared to you, meaning that you will both have different trading outcomes. This is a huge problem because it creates a selection bias related with the back-testing starting time as results change depending on when you start the test. It also magnifies issues dealing with execution as just missing a trade can cause two trades to have completely different results going forward. To avoid this you need to modify your strategies such that an action is always taken when a signal is received, even if you already have a trade open in the same direction.

Feed dependency: The Forex market is not a centralized market trading through an exchange and therefore the prices quoted by different brokers are somewhat different, something that causes differences when executing trading strategies. When developing systems it is very naive to use a single feed in Forex because a trading system can work very nicely on one feed only to fail on another. This can happen due to a variety of reasons but most commonly reflects curve-fitting of systems to some aspect of the data that is unique to the historical feed that you have used to back-test your strategy. Sometimes this uniqueness can be narrowed down to artifacts within the data that were introduced within a post-processing step you might be unaware of (like filtering the data). It is therefore important to always test your Forex systems across at least two feeds from two completely different sources. You should always test that your system has a small feed dependency.

Rounding up and uncontrolled risk: Forex retail traders who start with small trading accounts on brokers that have 0.01 standard lot minimal lot sizes (1000 USD) often have the problem of needing to trade lot sizes that are below their brokers minimum lot size for a desired risk level. The solution that most developers implement is simply to round up the lot size whenever it falls below the minimum allowed by the broker but this creates a huge problem with risk control. Imagine you’re trading a 1000 USD account and your calculated lot size for a trade should be 0.003 but your broker only allows you to trade to 0.01 so you increase your lot size to 0.01, this means that you’re more than tripling your intended risk on a trade, which indeed triples your expected profit and drawdown targets. However since you’re unaware of the magnitude of this rounding you’re unaware of what to expect, this create a serious risk control problem. Never round up a lot size when it falls below the broker minimum lot size.

The above summarize some of what I believe are the most important problems a developer faces when creating Forex trading strategies. Clearly the above only covers technical issues that are faced at the start of the development process and does not address problems related with statistical biases which are probably much more tricky to overcome in a reliable manner. On a future post we will also go through these issues and give some ideas about how they can also be overcome.

If you would like to learn more about system development and how you too can program your own trading strategies please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.