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: , , , , ,

Post a Comment