Create Your Own Forex Trading System Part 3

Post on: 24 Апрель, 2015 No Comment

Create Your Own Forex Trading System Part 3

Now that you have both a hypothesis for a forex trading system and a logical, well-reasoned combination of indicators and tools to use, it’s time to compare the system against historical market data. Fair warning: this is the hardest part of the whole process! Proper testing of a strategy will involve a great deal of trial and error, so don’t expect to come out with a perfect system after the first bout of tests.

Testing your strategy will involve three main steps. First, manually test the strategy on a small number of trades using historical data. Then, program the strategy and test it over a larger set of data. If that test is promising as well, the final step is to run the strategy on a demo account before testing it with real money.

Preparing For the Test

Be sure to write down the entry and exit logic for your strategy to use as a cheat sheet during the testing period. Creating a spreadsheet to record your entry point, exit point, pips gained or lost, and the time the trade occurred so you can easily keep track of your system’s hypothetical performance will also save you a great deal of time by the end of this process.

Step 1: Conduct a 25 Trade Sample

To manually test a strategy, simply follow along the price action history on the chart and check to see when your system’s conditions are met. Then, measure how many pips would have been gained or lost if that trade had been taken. It’s best to record the results both on the chart itself and on your spreadsheet. A manual trade sample looks something like this:

A 25 trade sample should be enough to determine a system’s viability, which is the main goal of this test. Manual testing will not provide accurate profitability statistics, and it’s not meant to! To test whether your 25 trade sample shows a viable strategy, ask these two questions:

  1.  Does the system take trades that line up with the hypothesis? ( i.e, if your hypothesis is for a breakout strategy and you’re trading during trends, that’s a bad sign!)
  2.  If it is functioning as expected, does it look reasonably profitable? Again, approximation is fine here.

If the answer to either of these questions is “no”, it’s time to head back to step 2 and pick some new indicators or tools to use in your system. Keep repeating this process until you have either exhausted all options for testing (which means your hypothesis is no good), or you can answer “yes” to both the questions above.

Step 2: Turn Your System Into A MetaTrader4 EA

Once the viability of your trading system has been determined, it’s time to have the system programmed so you can test it against years of price data. While there are dozens of trading platforms out there to choose from, MetaTrader4 is the easiest, cheapest, and best platform for automated trading and testing that is available to retail traders.

If you are not proficient in MQL (the language used to program in MetaTrader4) you will need to hire a programmer to code your system. Luckily, there are hundreds of specialized MetaTrader4 programmers to choose from, and they are generally quite inexpensive ($100-$200 per job). If you dont know a programmer already, many offer services on E-lance .

Before hiring anyone to code your strategy it’s important to make sure they understand exactly what your system is meant to do, and that they can articulate the system back to you both in writing and verbally.

Create Your Own Forex Trading System Part 3

Conducting a MetaTrader4 Back Test

Now that you have a coded version of your strategy, it’s time to test it against at least 5 years of data to see how profitable it was (hypothetically). However, the strategy tester native to MetaTrader4 is limited in several ways, and you will need to take some extra steps to create high-quality, accurate tests.

Without modifications, the MetaTrader4 strategy tester is limited to using 1 minute data provided by the MetaTrader platform. This normally results in a modeling quality of somewhere around 70%, leaving a huge, 30% margin for error in your tests! Functionally, this means that you could run the same test multiple times and get wildly different results each time.

Luckily, there is an easy fix to this issue. The Tick Data Suite  from Birts EA review allows you to import data from a 3rd party into the MetaTrader4 platform and run your test using tick data – in other words, every single price move will be factored into this test. Any back test is only as good as the data used, so this is definitely a worthwhile investment!

The Danger of ‘Optimization’

Now that you have ensured the highest possible modeling quality for your test, it’s time to plug in your EA and see what results the last 5 years would have produced. More often than not, traders will run their first test and receive a disappointing result – their system loses money.

To counteract this problem, your first instinct will be to simply change the parameters of your trading system and see how that effects the result. Perhaps you’ll change the moving average from a period of 10 to a period of 20, or increase the stop loss from 12 pips to 13.5 pips, getting better and better testing results each time. Many traders continue to do this until their back test shows millions of dollars in profits over only a few years!

This is a process known as ‘curve fitting’ or ‘optimization’, and is an automated trader’s worst enemy. While it is fine to tweak the parameters of a trading system a little bit to adapt to market conditions, changing around parameters just for a better back test will not create a system that is profitable in the market. If you need to change any given parameter on your system more than +/- 15%, it’s time to return to step 2 of the process and re-think how your system is put together.

The End Result

If the un-optimized back test you ran in MetaTrader4 shows a profitable trading strategy, its time to put that bad boy on a demo account and run it for at least a month before putting any real money at risk in the market. If, on the other hand, your strategy failed to yield a profitable back-test and manual test, its time to once again head back to step 2 and re-configure your system to better reflect your hypothesis.

Building an automated trading system is not an easy or fast process. In fact, the professionals at PoseidonFX have created dozens of unprofitable systems before building any that made money! But, like anything worth doing, the payoff at the end of all that hard work can be very lucrative.

We hope youve found our 3 part series on how to build a forex trading system helpful! Be sure to tweet any questions or comments you have @PoseidonFX, or leave a comment below.


Categories
Options  
Tags
Here your chance to leave a comment!