MACD Expert advisor tests

The MQL community page ( http://www.mql4.com/ ) is a great source of information and it provides me articles and source code. I can use the expert advisors made by other programmers and test them up, make modifications to them, use parts of their code, etc.

To start with this lets try a classic expert advisor that use the macd histogram and a signal line, this strategy was not something i use to trade on the days of manual trading but what i like from this expert is the way it is coded, a lot less code than what i was using to make expert advisors from the mql book.

Here is the article page: http://articles.mql4.com/84

The short and long entries are defined with the following:

The expert don’t have a stop loss, exit is executed when:

  • Long exit – by execution of the take profit limit, by execution of the trailing stop or when MACD crosses its Signal Line (MACD is above zero, goes downwards and is crossed by the Signal Line going upwards).
  • Short exit – by execution of the take profit limit, by execution of the trailing stop or when MACD crosses its Signal Line (MACD is below zero, goes upwards and is crossed by the Signal Line going downwards).

I have the historical test of 2010 for euro against dollar, 15 min chart in here: http://fforex.me/robots/macd/

As expected the expert didn’t had a great year but the lack of stop loss also have some very big losses, for example in january 2010 i can see a loss of -197.38 in a single trade. this goes totally against my tolerance, it is a very big loss for my trading style.

So i tried a new version that can also insert a stop loss of 30 into the trade, with this we will not have those big losses but we are also limiting the expert, remember that less risk can also mean less profit sometimes, this is what is happening in this case:

MACD expert with stop loss of 30

I like how it is coded as it is more compact than the expert sample of the book , i am not really expecting a profit from it, also i have to test all the experts i can found for free, it will help me understand more about the mql programming language.

Tags: , , , , ,

Strategy tester new results

The best i had until now was the expert advisor that uses the 21 and the 200 EMA cross with a 20 pips of stop loss and 30 of take profit (expert 5) and the expert where the same entry criteria was used but with a trailing stop moving in the direction of the trade after an amplitude of 40 pips is given (expert 7).

Now is time to test this 2 with the new historical consistent data:

Expert 8

and

Expert 9

The expert advisor code is the same as 5 and 7, i just want to difference the test results but they are actually the same code.

We can see that the earnings are less than with the original trades but that is of course ok if the test can be trusted.

Tags: , , , , ,

Strategy Tester Quality

I was checking the results of the strategy tester for my last experts advisors and i found that the quality of the results wasn’t something to be trusted.

Lets check some examples of out last expert advisor, Expert 7, check this results report from january 2010:

http://fforex.me/wp-content/content/experts/ea7/eur-usd/ea7_january_2010.htm

Focus in this 2 results numbers:

Modelling quality: 81.53%
Mismatched charts errors: 49

I was checking in the internet and i found that a 90% quality is solid for a historical test, on our case we have a 81.53% of quality, is not that bad really BUT lets go ahead and check some other results, for example same expert advisor in february:

http://fforex.me/wp-content/content/experts/ea7/eur-usd/ea7_feb_2010.htm

Modelling quality: n/a
Mismatched charts errors: 11006

The erros in the charts are so much (11006) that they are marked in red and also the model quality cannot be displayed. This means this results cannot be trusted at all.

Similar problems are everywhere:

http://fforex.me/wp-content/content/experts/ea7/eur-usd/ea7_march_2010.htm

http://fforex.me/wp-content/content/experts/ea7/eur-usd/ea7_april_2010.htm

A solution was needed for this problem before going further with any strategy, results haves to be trust able.  As a first approach i downloaded and synchronized the history data from meta quotes that came with meta trader, the results were even worst, huge gaps of missing data, i even found a gap of an entire month from may 7 to june 8 2010.

It was not easy, toke me a few days of research but i am now working with data from http://www.fxdd.com/, they provide free data for meta trader, with this historical data my tests are 90% quality and no mismatched chart errors are present at any tested period.

My next step is to test the 2 most profitable expert advisors i did until now using the new historical data from FXDD.

Tags: , ,

11 – 31 Moving Averages Difference for Trend Development US Session Only

Same as Expert Advisor 1 but with the addition of a trade range, in the US session only. This is more realistic to develop at my home office, i don’t want to have computers turned on 24h for now.

Expert Advisor 2 – US Session Trading

As we can expect the program will make less trades in the euro-dollar market:

January -147.61
February -82.53
March -203.67
April -91.90
May 89.77
June 15.66

————————————
-420.28

It is clear that the robot can’t perform well in the US session only either, but this was expected so no problem. this EA was made mainly just to have a robot that can trade only while i am following it. each edge will have to be tested using 24 hours, american session, europe, tokyo, etc.


Tags: , , , , , ,