4-Hour MACD FOREX Strategy: Pattern I "Trend Continuation"
В 20 issue of ForTrader.org magazine we will consider the next pattern of the system - pattern I "continuation of the trend".
Recall that we continue to consider the trading strategy "4-hour MACD FOREX strategy", which brings its author an average of 300 points per month, has been tested on historical data and works successfully on the account of the author for over two years. The strategy is based on the work on MACD patterns, as well as on combinations of moving averages.
Indicators used in the trading strategy
MACD:
- FastEMA=5
- LowEMA=13
MovingAverage: three exponential moving averages with periods of 7, 21, 365 and a simple moving average with a period of 98.
Trading strategy algorithm
So, to work on the strategy we will need: the MACD indicator and four sets of moving averages. We will use the 4-hour chart of the EURUSD currency pair for our study.
The author of the strategy offers 6 different effective versions of the patterns for trading. In this issue we will test the fifth and one of the MACD continuation patterns - continuing trend. Pattern I.
More about the pattern I "Trend continuation"
For a successful formation of a pattern I to sell the MACD histogram must form a minimum below -0.0015, then rise above -0.0005, without crossing the 0 level, fall below -0.0005. The pattern formed is a signal to enter the market to sell.
For a successful formation of a pattern I to buy the MACD histogram must go above 0.0015, then it must drop below 0.0005 without crossing 0, and take the value above 0.0005. The formed pattern is a signal to enter the buy market.
Searching for a buy signal
- The MACD histogram should make a maximum above 0.0015;
- After making a low above 0.0015, the histogram should go below -0.0005 and without going below zero it should reverse above 0.0005;
- Stop Loss is placed 10 points below the last local minimum;
- The first target for the 30% position closes when the price is above the 21-period exponential average;
- The second target for half positions is closed when the price reaches a value between the 89-period simple moving average and the 365-period exponential average.
- The third target for the remaining volume of positions is closed when the price reaches the level of price resistance.
Searching for a sell signal
- The MACD histogram should make a maximum above -0.0015;
- After making a high above -0.0015, the histogram should take a value above -0.0005 and then, without going above zero, turn down with a value below -0.0005;
- The stop loss is placed 10 pips above the last local high;
- The first target for the 30% position closes when the price is below the 21-period exponential average;
- The second target for half positions is closed when the price reaches a value between the 89-period simple moving average and the 365-period exponential average.
- The third target for the remaining volume of positions is closed when the price reaches the level of price resistance.
Testing pattern I trading strategy
By implementing this pattern on the MQL4 language in the form of an EA, we derived the following parameters for the possibility of optimizing the strategy:
- stoplossbars= 6 — количество баров, за которое определяется максимум или минимум для установки стоп приказа;
- takeprofitbars= 20 — количество баров, за которое находится сопротивление или поддержка;
- otstup= 10 — количество пунктов для отступа от найденного максимума или минимума при установке стоп приказа;
- lowema= 12 — период индикатора MACD;
- fastema= 26 — период индикатора MACD;
- maxu= 0.0015 — верхний уровень индикатора MACD для отслеживания образования вершин на продажу;
- maxur= 0.0005 - lower level, crossing which forms a buy signal;
- minu= -0.0015 — нижний уровень индикатора MACD для отслеживания образования дна на покупку;
- minur= -0.0005 — нижний уровень индикатора MACD, при пересечении которого сверху вниз образуется продажа.
Having tested the above rules from 2001 to 2008 with the default indicator parameters, we obtained the following results:
During the whole period, the result was -$743, with a drawdown of more than $3000 when working with a constant volume of 0.1 lot.
As we see, trading according to the standard parameters of the strategy is unprofitable and not as efficient as we would like it to be. Let's try to choose the most optimal parameters of the Expert Advisor in the period from 2007.01.01 to 2008.01.01 and then check their workability in the future period up to July 2008.
Optimization of the I-trading strategy pattern
Having tested different combinations of strategy parameters from 2007.01.01 to 2008.01.01, we got a number of profitable settings for the strategy and chose the first, in our opinion, good variant by the ratio of profitability and maximum drawdowns working for the future:
Profit: 1551.00 Number of transactions: 42 Drawdown: 561.00
Parameters:
- Stoplossbars=8;
- Takeprofitbars=47;
- Otstup=47;
- Lowema=2;
- Fastema=6;
- Maxu=0.0005;
- Maxur=0.0015;
- Minu=-0.0005;
- Minur = -0.0030
Let's see what results the optimized strategy produces.
Как видим, результат получился положительный: за этот период прибыль составила — $1551. Начальный депозит был равен $1000. Просадка составила $561.
In order to be sure of the effectiveness of the pattern, let's test its performance on a future period: from 2008.01.01 to 2008.07.06.
As we can see, the parameters are effective for the future: the profit was $1513 while the initial deposit was $1000, the drawdown has decreased significantly to $286. This indicates a good perspective of the system when working in the future, perhaps it is possible to find even better parameters than the ones we have chosen.
We tested the system on the hourly chart and also got good performance on the future.
The parameters for the hourly chart are as follows:
- stoplossbars=14;
- takeprofitbars=47;
- otstup=50
- lowema=24;
- fastema=4;
- maxu=0.0005;
- maxur=0.0005;
- minu=-0.0045;
- minur=-0.004.
Let's summarize the results of testing the trading strategy
The strategy, according to experts of ForTrader.org magazine, is effective for working on FOREX market and with a high probability with the right approach will bring the trader profit, especially note a good ratio of profit and low potential risk when working with the parameters we found. We have not optimized the parameters of moving averages, perhaps the optimization of these parameters will also improve the result.
Our verdict:
Паттерн I «продолжение тренда», на наш взгляд, является практически одинаковым по эффективности с паттерном D, описанный в 19 номере журнала. Особое преимущество — это низкий уровень просадки, а также большее количество сделок. Мы рекомендуем этот паттерн для торговли при нахождении хороших параметров с проверкой на будущем.
We should also note that different brokers different properties of the quotes and the results of our given parameters may be different.