MQL4 - automated forex trading   /  

Code Base

Read Financial Magazines in MetaTrader 4 and MetaTrader 5!

Code Base  Expert Advisors  The pattern MACD - head and shoulders. Good but on rare occasions. To post a new code, please log in or register

Download MetaTrader 5 and visit MQL5.community Code Base
and Trade on the Go!
and Trade on the Go!
Couldn't find the right code? Order it in the Jobs section

This Expert Advisor is for
MetaTrader 4
Download MT 4 - 455 Kb

and Trade on the Go!

and Trade on the Go!

Name:
The pattern MACD - head and shoulders. Good but on rare occasions. [ ru | cn ]
Author: fortrader (2008.06.27 10:27)
Downloaded: 3156
Download:
 MacdPatternTraderv03.mq4 (7.7 Kb) View

The implementation of the pattern MACD head and shoulders


The original of the trade strategy is available by the link:
http://www.unfx.ru/strategies_to_trade/strategies_134.php

The EA was written to verify the effectiveness of the strategy described by the author, you can view the educt and the description of the EA in the latest issue of our journal:
http://www.fortrader.ru/ftgate.php?id=0&num=54


Short Description of the EA's Algorithm:

1. Time period: H4;
2. Symbol: EURUSD;
Volume: 1 lot
3. Indicators: ЕMA7, EMA21, EMA359, SMA89. MACD 5,13,1.


Searching for a buy signal
1. The MACD hystogram must form a minimum below -0,0030;
2. Once the minimum below -0,0030 has been formed, the hystogram must form another lower-lying minimum below -0,0045;
3. Once the minimum below -0,0045 has been formed, the hystogram must form another minimum that lies above the first and the second minimums;
4. The stop-order is placed below the last local minimum by 10 points;
5. The first target for 30% of the position is closed when the price's value is above the 21-peroid exponential average;
6. The second target for the half of the position is closed when the price reaches the value betweeen the 89-period simple sliding average and the 365-period exponential average;
7. The third target for the remaimig part of the position is closed when the price reaches the price resistance level.


Searching for a sell signal
1. The MACD hystogram must form a maximum above 0,0030;
2. Once the maximum above 0,0030 has been formed, the hystogram must form another higher maximum above 0,0045;
3. Once the maximum above 0,0045 has been formed, the hystogram must form another maximum that lies below the first and the second maximums;
4. The stop-order is placed above the last local maximum by 10 points;
5. The first target for 30% of the position is closed when the price's value is below the 21-peroid exponential average;
6. The second target for the half of the position is closed when the price reaches the value between the 89-period simple sliding average and the 365-period exponential average;
7. The third target for the remaimig part of the position is closed when the price reaches the price resistance level.



Testing the EA with the standard parameters:

After optimizing the parameters:

Reasonably good combinations are obtained during working on the future and the past, read the details in our journal:
http://www.fortrader.ru/ftgate.php?id=0&num=54

p/s All possible variables are outputted to the external parameters, you can pick up some good parameters for the intraday charts too, experiment. Testing with the ticks is dispensable. If you have any ideas about updating the EA or any questions, write.

1 comment  To post a new comment, please log in or register

Hello,


Could you please try to help me write the EA like this:  'Can somebody try to write EA based on Taichi & deMarker indicators only on 1 hour charts?'

The above link is to my subject I have added last time on this MQL Forum...


Best regards,

Puncher

POLAND

03.07.2008 08:54 puncher