MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

MetaTrader Market: we have 650 Expert Advisors for algorithmic trading!
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2008.06.27 08:27
The pattern MACD - head and shoulders. Good but on rare occasions.

The pattern MACD - head and shoulders. Good but on rare occasions. - expert for MetaTrader 4

| English Spanish Portuguese Russian Chinese

Views:
3761
Rating:

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.

Translated from Russian by MetaQuotes Software Corp.
Original code: http://www.mql5.com/ru/code/8212

Last comments | Go to discussion (1)
Piotr
puncher | 3 Jul 2008 at 06:54

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