Featured EA (Nov 2013): MACD Sample EA Updated

I also took a look at the sample systems included in MT4 and found an updated version of the MACD Sample EA. The currency pair and time frame weren’t specified so I just decided to run the tests on my favorite pair and time frame, which is EUR/USD 1-hour, for Oct 2010 to 2013. Here’s what I got:

Number of trades 190
Profit/Loss in % 1.30%
Win ratio 73.68%
Largest profit 0.75%
Average profit 0.59%
Average loss 0.27%
Maximum drawdown 0.39%

For more information: MACD Sample EA Updated - MQL4 Code Base. Go ahead and download the MQ4 files if you wanna backtest or optimize the EA. Just share your results in this forum thread so we can have a good discussion going on!

Got a 1.65% return on USD/JPY but using the 5-minute chart then a 78% win ratio. Anyone got any ideas on how to make the most of this strong win ratio and maximize returns?

Hi RoboPip,

Which parameters did you change to get such a result?
I’ve tested (USD/JPY-5M) it with standard parameters and becomes 0.91% return.


I tried to get the same results as you. So I’m not sure how my results are so different, but here is what I got using default EA parameters. I ran it (version 452) on the MT4 Strategy Tester (from HotForex) with these parameters:
EURUSD, H1, starting with $1K, Spread: 2.0 pips, from Oct.1, 2010 to Oct.1, 2013.

Number of trades 292
Profit/Loss in % 16.2%
Win ratio 69.86%
Largest profit 0.75%
Average profit 0.31%
Average loss 0.53%
Maximum drawdown 4.76%

Considering that this is over a 3-year period, 16.2% profit is nothing. But the win ratio is definitely there! Considering that this EA had such a small drawdown, you can safely increase your lot amount to 0.1 from 0.01. The profit now becomes 162% with 22% drawdown - now that’s better! Other timeframes are not as good, but then again, SL and TP values need to be adjusted accordingly.

You can use ADX as a filter to avoid trading during environments where the strategy does not perform well. Trading strategies cannot earn during all market environments, just like RoboPip cannot live on every planet in the universe! :smiley:

If you can filter out a majority of the unprofitable times, you can look at improving the exit strategy from there. Just be careful not to over-optimize and risk curve-fitting.

Guilty of curve-fitting! :8: Would you use ADX to decide whether to get into a trade, of if to get out early? And why ADX, and not other indicators?

I just used ADX as an example as it’s quite common to hear people talking about using it as a filter for market conditions (trending or ranging).

Of course there are other ways to do it. Some are quite well-known, while others are guarded heavily. I spent a lot of time doing research in this area, and believe me, it does take a while to sift through everything.

Ok, I DID do some tweaking - the best I knew how… :slight_smile:
I managed to filter out some less profitable trades, which changed up the results.
To summarize, I improved win ratio 70 => 74 %, (I never did get 74%, as stated), while reducing the drawdown.
It now works beautifully and consistently since 2007, which covers 2008/2009 crash.
But there is one failure period: January - May 2010 (HELP! What happened there?!?!)
The original EA fails there too (actually it’s even worse)
Anyhow, here is the report, and the EA. Do you get the same results? If it was 74% for you before, do you get more now?
I don’t know if it works with other pairs/timeframes… Let me know if you find parameters that work for them… I’m too tired from crunching the numbers… My head hurts…

PIPS-MACD-LS V3 report.pdf (443 KB)
PIP-MACD-LS V3.zip (11.5 KB)

June 2010 - Oct 2013:

RoboPip - any thoughts?

Hi Sigalovl,

is free to use in real accounts??


Yes, no restrictions. Try it, but please, kindly let me know how it behaves.

One thing I forgot to mention is that the above number where achieved with OpenLevel = 2.7 (original 3), CloseLevel = 1.7 (original 2)

Hi sigalovl and many thanks.

I try this EA and is good for me… but only few trade…

My best set are:

tp 75 sl 90 ts 35 O 2.7 C 1.7 and only long

What do you think about this??

How can I send you a private message???

Can I have the source code of EA??


It is always a problem while people testing the SAME code have worse result. With EVERY test…

Why ?

Win ratio alone is nothing. Gain expectancy is the whole thing…

I can have 90% success rate, if ratio R/R is 5% i will lose at the end :

Gain Expectancy = (90% * 5%) - (10% * 95%) is negative !

Such a basic thing !


I would say “only long” is not something very versatile… Try to find other parameters for “only short” for example.

Did you change the logic in any sense? Wanted to look at the code but it seems to be encoded as ex4

@Rahan No, it makes both - short AND long trades. Like I said it’s almost the same as the original.

@liftoff The only changes are - it’s checking for several other conditions, and if ALL of them match, it doesn’t make the trade - tries to filter out more trades that are expected to be bad (but inadvertantly filters out some, that are good too). If you want to look at the code, look at the original one.

@luke80 - yes. A small number of trades is a concern. That’s why I’m looking find out of if it works with OTHER currencies too! If this works on 4 other currencies, and let’s say doubles the amount of trades - that should be enough.

HAPPY NEW YEAR, everyone! :smiley:

Agree with sigalovl :

  • Filtering help reducing losses in trying to remove very bad trades. Very good article on MQL4 articles on “magic of filtering”.

  • Multicurrencies is a way to enhance the number of trades : but then take care of currencies correlation.

Wish you all green pips for 2014.

May i ask you how and/or wherr you get your testing data ?

With my MT4 (Pepperstone) i can only go back to may 2011.

I’d like to improve and share the strategy.

By the way very good report. Simple and concise.

Thanks !

Yowza! Didn’t realize y’all had a lot of comments and tweaks on this mech system. I’ll look closer into this one!

1 Like