If you have ever tried to back test Forex strategies based on indicators then certainly, you stumbled upon one of the most common problems: which parameter of the indicator to select in order to maximize your profits.
We have tested the 2 Simple Moving averages crossover on a randomly chosen broker, currency pair and data and received the following results of the testing:
|Net profit||SMA1 period||SMA2 period||Max drawdown|
This strategy is a well-known one on the Internet but no one suggests which parameters a trader should choose for a profitable trading. This table shows that you can’t choose just random parameters because it will affect your trading significantly. Does this table mean that you need to choose the “20” and “40” parameters for your Simple moving averages? Of course not and we do not suggest you to do this. These parameters were working on GBPUSD currency pairs on 155 random days on the Forexite broker. The results may vary a lot depending on the currency pair, period and broker. So what is the solution?
I assume that you already have Forex Tester 2 installed on your computer. If no, please visit this page: www.forextester.com/download. There you will be able to download the free trial of the software in just one click.
Go to the “Tools → Strategies list” menu the “List of strategies” and then check the SimpleSMA checkbox. Double click on the strategy’s string and make sure that the timeframe value in the pop-up window is just the same as the current timeframe as well as the currency pair in the setup window is the same with the symbol you will test you strategy on. If it is not, then select the necessary one from the dropdown list here and click “Apply”. Close the window and go to the “Testing → Enable Strategy execution” menu, and start the test.
When you unpause the button and go on with the test you will notice that trades will be open on their own. Let’s take a look from where all those trades come. In our “Strategies list” setting, we can see that the SMA parameters are set to “16” and “32”. Let’s draw these lines in order to get some visual comprehending.
As you see now, the trades were open just when the red moving average (the one with the period of 16) crossed the blue moving average (the one with the period of 32). When the red line crossed the blue one upside down, the sell order was opened automatically. When the red Moving average crossed the blue one upwards, the buy order was opened.
There is a wonderful tool within the Forex Tester that is called the “Strategy optimizer”. It allows to back test tons of different parameters of the same indicator in a really fast and easy way. Let me show you how it works: select “Tools-> Strategy optimizer” and you will see this window. Choose the “SimpleSMA” strategy in a dropdown list, go to the “Test options” and change the SMAs’ periods. Let’s say we want to know which parameter brings the biggest profit from 20 to 25 for the red SMA and from 40 to 45 for the blue SMA.
We need to go to the “Test options” and select the “Strategy parameters” tab. There you can set 20, 1, 25 parameters for the first moving average and 40,1,45 parameters for the second line. These parameters mean that Forex Tester will begin with testing the 20 and 40 moving averages, then switch to 21 and 40, 22 and 40 until it reaches 25 and 45. At the end of the test we will export results to MS Excel or csv file and take a look, which parameters gave the best result.
The most important column of the entire file is the N column that stands for the “Net profit”. At the end of the day, the only thing that matters is whether you earned money or not. That is why all other columns are not that important. Let’s sort the values in this file from largest to smallest. We now see that on this currency pair, on this broker and on this period of time of 155 random historical days, the biggest profit gave the 20 and 40 parameters of SMAs – the total net profit is 263 dollars. In fact, out of 37 different results that we’ve tested, only 4 of them gave a positive result. Do you see now how powerful this feature is: 20 and 40 values will provide you with $263 profit and changing the first value from 20 to 23 would make you earn just $11. Simple changing of the parameter of one Moving average by 3 would make you lose all of your profit. Let’s go even further and notice this fascinating thing: what if you do not change the first MA and change the value of the 2nd line from 40 to 45? You will end up with -$617 on your deposit.
Now, when you see how important it is to set the right parameters of the indicators for any strategy, when you understand that back testing is a must for a profitable trading you can find your own parameters. Please do not try to use the 20 and 40 parameters as those that perfectly match – they matched on this particular broker, on GBPUSD currency pair and on this time period of 155 random days. Use Forex Tester instead and make your own research.