In this second post of "Do expert advisers or Forex robots really work?" I will take you through some real live examples of what I meant in part 1. In part 1 of this post I talked about how the creators of these Robots curve fit the parameters to create a so called, profitable robot, that everyone wants to buy.

I just want to make one thing very clear here, I'm not slamming or discrediting anyone in these posts. I'm just showing how some of these results are generated. I program EA's as well, so I know what it takes to create a profitable EA and it's not as easy as these programmers make it out to be.

Anyway, to get started, I will use one of my own robots I created to explain how optimization works. The robot I created is profitable without the need to optimize it, but it won't make you rich. You might get a return of $2000 dollars for a whole years trading with a starting balance of $1000. That's hardly getting excited over, but still you won't blow your account. I will also make this EA available for download later. I just need to make it more user friendly before I post it.

So, I've created a robot that trades and I want to sell it. Like I said previously, it does OK, but no one will buy this for a $2000 return a year, so I need to sweeten the deal. I will make it look as if this EA is the best thing since they put flakes in ice creams.

 In metatrader4, if you click on "View" then select  "Strategy tester" you will get the strategy tester window. Here you can either just run a backtest on your EA or you can optimize you EA and run the backtest again. It all depends what you want to do.

In the below image is a screen shot of how parameters are optimized. (Click image to enlarge)


It usually opens at the bottom of the mt4 terminal. From here you can select things like the Expert adviser, currency pair, time frame, optimization tab and so on.

The next image is the actual optimization window where you can select which of your parameters you want to optimize for the specified date range. You will see that I selected all parameters.

Optimize window(Click image to enlarge)


So, lets run the optimizer with the date range set from 1 January 2010 to 8 September 2010. I've also selected automatic lots, which will increase my lot size automatically based on my account size. It's a feature I programmed into my EA and is not a mt4 setting. I will start with a balance of $1000.

The following image is the graphical results of the optimization.(Click image to enlarge)


This image shows the actual values(Click image to enlarge)


Not too bad. A profit of $2875.11 with a profit factor of 1.83% and a draw down of 25%. A profit factor of anything above 1.5% is considered, good. So the first run was not too bad. I then select the most profitable run and ran a normal back test to see how the EA traded within this period.

This graph shows the actual back test of the most profitable run(Click image to enlarge)


Does not look too bad. There are a couple of things on the previous chart that worries me a bit if I had to buy this EA, but more on that in my third post. I want to sell this thing so I'm going to sweeten the deal more. I'm going to firstly increase the starting balance to $10000 and move my end date to the 1st of August. August and September 2010 were not very good trading months for this robot so I took it out. Now let's look at the actual values.

Actual values run 2(Click to enlarge)


Wow, the best run turned my $10000 into $65267.65 with a profit factor of 2.41% and only 27% draw down. Let's look at the normal back test with the best run parameters selected.

Actual back test 2nd time around(Click image to enlarge)

 
Now this is a EA I would buy, or will I. Now, remember that the parameters have been optimized for a specific period of time. Now lets see what would happen if I run this back test using a different date range. Let's say the same period but a different year. Let's select 2009. So, now I'm running the back test from 1 January 2009 to 1 August 2009 with the same parameters as I did for the year 2010.

Actual back test for year 2009(Click image to enlarge)


Not so good this time. In fact I lost  about $4725! I don't think I would even consider buying this EA.  Even worse, how will it perform in the future. The robot might have done well from 1 January to 1 August 2010 but what about until the end of the year! It might even blow my account.

So, in the above examples, I showed you just how easy it is to manipulate an EA using the optimizer in mt4. There are still a lot of thing I could have done, but I hope you have a better understanding of how some of these robots achieve their great results. This is what is called curve fitting or optimizing parameters for a certain time frame. 

But there is good news. In part 3 of this post I will show you what to look out for when buying an EA. They are not all bad but there are a couple of things you should watch out for when buying a Forex robot. Even my little EA I wrote doesn't do badly and again I will use it to explain what to look out for.

I hope you found this post informative and again, I'm not slamming anybody out there. I'm just posting my own experiences I've had with EA's.

Till the next post.
Pieter