All who though time faced with trade on the financial markets know what a Moving average. This classic technical indicator is so widespread that is found in virtually every trading system. Even if the design things does not use moving averages directly, most likely, you will find other indicators that use the average in your calculations. Today we talk about the direct use of moving averages in trading systems, tests are the most common strategies for “Makkah”, and make a conclusion — whether to look in the direction of this indicator in today’s markets, or search for the Grail elsewhere)
By indicator you can discover in this article. It will introduce you to the basic options of its calculation and application in practice. Also in this article you can get acquainted with all the variety of types of moving averages that have emerged with the development of technology and, in particular, with the advent of home computers.
Basically, moving averages are used to reduce unwanted noise in time series to the market behavior, underlying the process of pricing became more clear and visible, clearly marked. They provide smoothing of the data. As smoothing method, moving average is a specific low-pass filter, passing low frequency activity and inhibiting high frequency of rapidly varying processes. On the price chart of high-frequency processes appear as rapid vertical oscillations, i.e. noise and lower frequencies as more subtle trends or waves.
In addition to the ability to reduce noise in the time series moving averages have the advantage of simplicity, clarity and functionality. However, like any powerful method of filtering or smoothing the data in real time, they have the disadvantage of lag. Although smoothed data is cleaner and therefore more suitable for analysis, there is a lag between the data in the original series and the smoothed data sequence. Such a delay could pose a serious problem in need of fast reactions to events, as is often the case, it is important for traders.
In some cases, the delay is not a problem, for example, in systems where the price line crosses the moving average in fact the price and should beat the average, so this system worked. The delay is more problematic in models where decision-making used pivot points moving average graph or its slope. In such cases, the lag means a delayed response that is likely to lead to unprofitable transactions.
All moving averages smooth the time series using an averaging process. The differences consist only in what the specific weight is assigned to each of the points of summation and how the formula adapts well to the changing conditions. The differences between the types of moving averages are explained by different approaches to the problem of reducing delay and increasing sensitivity.
The types of trading systems based on moving averages
Model trading systems based on moving averages to generate signals to buy or sell based on the ratio between moving average and price or between two (or more) moving averages. There are models trendsmedia and counter-trend.
The most popular models follow the trend behind the market. On the other hand, the model, going against the trend, predict reversals. This does not mean that market models perform worse against-the-trend. Reliable inputs in trend, albeit with delay, are considered more reliable and profitable than trying to predict reversals, which only occasionally occur in the expected time, the global extremum is usually one, while local is set.
Trendsmedia methods of generating trading signals based on moving averages can be implemented in various ways. One of the simplest models based on crossing moving averages the trader buys when prices rise above the moving average, and sells when prices fall below it.
Instead of waiting for crossing the line and the average price you can use a quick average and its intersection with the slower. A buy signal occurs when the fast average rises above the slow, the sell signal is when the fast drops below the slow average. Smoothing of data series through the use of moving averages reduces the number of false intersections and thus reduces the frequency of unprofitable signals.
Another way to use moving averages based on the use of crossing moving average and the moving average is shifted forward with the same settings. In this case, the buy signal occurs when the fast average goes above the original offset, the sell signal is when the original average falls below the offset. By choosing the magnitude of the shifts it is possible to reduce the number of false intersections, reducing the frequency of unprofitable signals. Sometimes using multiple moving averages shifted with different shift and different periods, as, for example, in the alligator by B. Williams or the Ichimoku.
Moving averages can also be used to receive signals sign in against-the-trend systems. Prices often react to a moving line similar to the levels of support and resistance what is the basis for rule: a login rule according to which buy when the price drops to the moving average or cross it from top to bottom, and sell when they rise before him, or crossing upwards. It is assumed that prices rebound from the level of the moving average changing direction.
What are we testing today?
So, I plan to test some of the classic approaches to the use of moving averages in trading systems:
- price crossing the moving average.
- the intersection of two moving averages;
- using the intersection of moving averages with shear (alligator, and Ichimoku);
- the intersection of price and the shifted moving average.
- multiple moving averages (three, four).
In addition to the experiments with the actual system, we will also speculate on different filters and techniques are designed to improve system performance. And in addition to this information, I chose more than a dozen modern vehicle, based on the moving averages, which are found on various sites and forums online and would like to check out in this article.
So, today we are facing a few questions that we will try to find the answer:
- should I try to create a trading system based on moving averages or this tool is hopelessly outdated?
- what are the best ways of generating trading signals based on moving averages?
- what methods of filtering the generated signals can be applied and in what cases?
- is it worth to pay attention to the current trading system using moving averages basis?
- what types of moving averages most effective and in what cases?
As you can see, the questions are many and we have a very extensive research. However, I believe that the answers are of interest to many traders and will be useful for both novice and experienced traders. It should be noted that this study is conducted for the Forex market for the commodity markets, commodity, stock markets the answers can be radically different.
And not to stretch it enough extensive research, I chose just a few currency pairs to study, trying to find them in such a way that the nature of their behavior most different from each other. However, these pairs must be from the group of the most popular. I chose GBPUSD, EURUSD, USDJPY, USDCAD and AUDUSD. I did not include the USDCHF, as it correlates with EURUSD and NZDUSD because of the correlation with the Aussie. Thus, our portfolio includes currency pairs you can traditionally find trending and flat couples with relatively high and low volatility, with sharp and smooth movements inside the day.
The intersection of price and the moving average
The simplest trading strategy based on using moving averages, based on the use of crossing the moving average price. The basis of this TS is put a simple trading idea: moving average in a trending market priced (due to the principle of the calculation of the moving average). It is therefore considered that if the price is higher than its moving average, the trend is upward, and if the price is under the moving average, the downtrend. Accordingly, if the price crosses its moving average, we can assume that the trend has changed.
The trading system will generate signals for entry when opening day bars on one side of the moving average and closed on the opposite side. The signal output will be generated together with the opposite entry signal. This type of system is called a reversing transaction, will be open all the time, when you receive a new signal will be a closing of the current transaction and opening a new one in the opposite direction.
Any management position, like the trailing stops will not be used. Orders take profit and stop loss also will not be used. In the automatic performance of such a system is dangerous in case I drop the server on which the system is installed, you may incur an unlimited loss. Therefore, the installation of restraining orders (or at least, stop loss) when the real trade is required. But for testing we can this rule be neglected.
In our basic trading system only one optimizable parameter is the moving average period. Here are the results of one of the optimizations:
Of course, the number of transactions rising period of the moving average decreases, but even at high period (200 and above) remains fairly high (150-200 transactions), to trust the test results. Now let’s more closely examine the optimal results:
Summary statistics for simple moving average:
— entrance after 1-3 candles, if the signal has not disappeared:
— entrance after breaking through the middle and passing the price of a certain distance, which depends on the current volatility (ATR). This distance should appear between price and moving average for a certain time, not exceeding the one specified in the settings:
— admission after break of the moving average, built on the High/Low prices:
Some of the entry filters do improve the system parameters and their combinations can also give better results. However, the system is a classic trend of TS in which the number of profitable transactions is much less than 50%, and the size of profitable trades exceeds the amount of loss-five times. Such a system is very hard to trade psychologically and to private traders, who are accustomed to more comfortable trade, this system is ill-suited. Typical balance chart has the form of a “ladder”:
The intersection of two moving averages
In the previous example, we used the simple principle of applying a trading system based on moving average, taken in its purest form and with some filters for the input signals. Yes, essentially it works like most display methods of technical analysis, but the problem, as always, lie in the details and nuances. And one of the nuances of the considered example is the fact that such strategies do not work on markets where there is no pronounced trend. They open up a lot of counter trades on “noise” in price movements, losing the profit accumulated in a trending market areas.
To partially eliminate this drawback by using the intersection of two moving averages, one of which is faster with less period, is a smoothed equivalent of the price chart, and the second, slower, is used to determine trend direction. The choice of the ratio between MA, you can reduce the number of false alarms due to the noise component of price movement, and reduce the number of transactions in the market with sideway trend.
Trading idea for this case is also very simple: if the fast moving average is located above the slow MA, then the trend is upward, and if below — downtrend. Accordingly, the point of intersection of the fast and slow MA are considered to be points of changes of direction of trends and are used as trading signals system:
In General, most of the results of the optimization are above zero profitability that indicates satisfactory stability of the trading system. The most profitable results for GBPUSD, for example, are obtained by using the fast moving average with a period from 50 to 100 and the slow moving average with a period of 110 to 180.
To avoid this situation will help modification of the rules of the system. Instead of a direct set fast moving average period, we will ask a ratio in the range from 0.01 to 0.99. Then MA_fast_period = MA_coeff * MA_slow_period.
Therefore, the period of fast moving average will never exceed a period of slow.
This trading system provides a more comfortable trade, drawdown periods then shorter. Average profitable trade is mostly higher than the average unprofitable in two or three times, and the number of profitable trades is around 40-60% depending on the currency pair. Such statistics already more acceptable for the retail trader:
The use of moving averages with shift
Another way to use moving averages based on the intersection of MA and shifted forward (backward) moving average with the same settings.
In this case, the buy signal occurs when the original MA rises above the displaced moving average, a sell signal is when the original average falls below the offset. By choosing the magnitude of the shift can reduce the number of false intersections, reducing the frequency of unprofitable signals.
A variant of this method is the method of using the intersection of the price chart with a shifted MA, or the price chart with shifted forward price curve. It should be noted that the last option (used, incidentally, in the popular Ichimoku indicator) represents not that other, as another indicator of momentum. Schedule of rates, together with forward shifted moving averages used in trading system by bill Williams. We consider the intersection of two moving averages with shift and without:
The intersection of price and the shifted moving average
This option trading strategy consider for the reason that it is used as input signal in a number of trading systems.
Trading idea is slightly different from the previous case. The only difference is that instead of crossing two moving averages, use the intersection of price and the shifted moving average.
For this system we got so many negative results, up to 50%, which may indicate instability of the model. However:
All this indirectly indicates a fairly high stability of trading systems based on moving averages – if on a particular currency pair most customization when optimizing makes a profit, it doesn’t really matter what one to use. If the market does not change (trends will not disappear, which is unlikely), then the system, with great probability, will bring profit to its owner for a long period of time. How acceptable profit potential for a trader – is another question, but judging by the test results, it has a chance to make many.
With multiple timeframes on the basis of MA
This trading strategy is the equivalent of random crossing the moving average price, but only for several time frames, wherein the temporal scale of the data representation. The essence of trading ideas for this case is as follows: we believe that the market is in an uptrend, if the price is higher than all three moving averages, i.e. that the three trends of varying duration on three multiple time frames represent the data classied as ascending. To do this, we take the H4, D1 and W1 and inflict on them the moving averages with different periods.
The system was very stable, negative results were less than 10% of the total weight. However, the results are not too impressive. Here they are:
Trading system based on alligator indicator by bill Williams
Opinions about the books by B. Williams “Trading Chaos and New trading dimensions” in the trading environment is a range from total rejection to enthusiastic veneration. Why not have is indifference, and just about the method books and say what-that they have, at least, to be commended promotional talent B. Williams.
Trading strategy bill Williams is not a mechanical trading system and a trading-analytical complex of a large set of rules and techniques of market analysis and trading operations, in which everyone can create his own trading strategy.
We will consider only one of the elements included in the trading-analytical complex B. Williams and based on the application of a set of shifted moving averages, the so-called “alligator” by bill Williams, and a simple trading strategy that can be built on the basis of this indicator.
Bill Williams, a psychologist, writes vividly and brightly, taking into account the psychology of perception of the text by the reader. Therefore, his books are remembered, especially if they have been read at the stage of initial acquaintance with the market. Alligator, according to Williams, hunts for prey, which is the price. When the Alligator lines are intertwined with the line of the price chart, then the prey is caught, the alligator is well fed and passive. The trader at this point is also in the standby mode.
Using the passivity of the Alligator production – the price starts to slowly slip away from the area indicator lines, the alligator starts to feel hunger, wakes up and opens his mouth trying to catch the elusive prey. First, open the lips of the Alligator green line, then teeth, and finally open jaw – blue line.
The indicator lines are arranged in the order green-red-blue and are moving with the price, yet the trend continues. As the trend can not last forever, sooner or later, the alligator catches up with production and price again falls into the area indicator lines. Process with certain differences is repeated cyclically as the emergence and development of new trends.
The first trade idea, which arises when considering the alligator indicator Williams, is to use it as a trend indicator. If the indicator lines are arranged in the order green-red-blue, it is obvious that the trend is upward, if the order of lines blue-red-green, then a downtrend. Try to test your trading strategy based on order of lines.
For shopping we have identified the simultaneous fulfillment of the conditions that the green line is more red, and more red blue. For sales – the simultaneous fulfillment of the conditions that the green line is less red, less blue and red. The condition for opening positions complete a test of the relationship between the closing price and the red line of the Alligator, to avoid conflict between the rules of opening and closing positions. Optimization will not use, check out the alligator in its original form.
This system gave no positive results:
In addition, we found the answer to most questions. For example, we can say that the moving average is still fairly effective technical analysis tool and that systems based on it can be quite effective. It is best proved system at the intersection of two moving averages, the most effective type of moving average is different for each currency pair.
We considered typical examples do not exhaust all the possible variety of variants of moving averages as trading systems, but they provide a basis for the formalization and study of almost any trading strategies based on moving averages.
In addition, we have only one last question on expediency of research of modern trading systems based on moving averages and freely distributed in the network.
A modern trading system based on moving averages
No matter what the timeframe calculated strategy, we will use H1. Also, we will apply your rules out and follow positions. It unifies the strategy is basically different will be only the rules of entry. Thus we will be able to compare it’s efficiency entering trades.
Window MA
After the breakdown of the price ЕМА8 , it is suggested to wait for the pullback and touch price ЕМА8 for 5-15 candles. If this occurred, a new position in the direction of the initial breakout. It is proposed to set a fixed stop-loss and take-profit, position maintenance is not provided.
The strategy conceived for the M15 timeframe, but we will use it for H1. We also use different rules for the release and support positions. Also some modifications to the rules of the entrance is a candle touched MA, should be directed in the direction of the open position is a small candle filter, which is designed to improve the results of the TS.
Battle of the channels — Battle of the bands
The following strategy is called Battle of the bands. The TC is designed for time plots and uses the channel of two MA, built on the high and low prices. To filter the transactions using moving averages with a period of 100 and 200 sales price should be under them, to do your shopping on them. A trade entry is when price breaks the channel of MA and Parabolic SAR confirms the planned trend. In the original plan to install the stop loss on the opposite side of the canal from MA and a trailing stop value of about 15 points but we, as usual, use your rules out.
EMA + Stochastic
The following system — EMA + Stochastic. This is another fairly simple strategy that uses three moving averages and the Stochastic oscillator.
The rules are simple and banal. Here is an example for shopping: two fast MA cross slow up and the stochastic is above a certain level. The figure below is an example for sales:
Hi-Lo
This strategy uses the moving average channel. The buy signal is crossing the border of the channel faster moving average. An additional filter is the testimony of ADX and candlestick closure outside the channel:
Conclusion
As we have seen today, trading systems based on moving averages remain relevant. Judging by the results of our research, on the basis of this indicator it is possible to develop a quite profitable trading system, which can operate stably for a long time to bring profit to its owner.
As the results of our tests, the best option generate entry signals using moving averages is using the intersection of two mašek. This option showed the most smooth yield curve and better statistics compared to the rest of the classic ways to trade moving averages.
In this case the best option filter trades is the expectation of a certain number of candles. If, say, for 3-5 candles of the conditions for entry have not disappeared, such transaction will be successful with greater probability. In addition, you can experiment with filtering trades according to the testimony of various indicators or candlestick patterns, but our task is not included. Therefore give you this possibility.
We also met with several modern trading systems that I randomly chose on the network. They all showed very similar results. The main point that I would like to emphasize, is that three of the four considered systems have lost their relevance in 2015. Rather, it suggests that the authors of the manual trading systems produce hard fit to the market, do not use forward testing and otherwise violate the basic principles of developing sustainable trading systems. It is not surprising that the majority of retail traders lose their deposits, using the trading system, found online and put on live account without thorough testing on a demo.
However, virtually any trading system you can find something interesting – the approach, the principles of support positions, the closing of the transactions or the original methods of filtering the signals. This can be especially useful for the beginners in the Forex market.
Thus, no matter how abused moving averages over lag, over-smoothing and so on, today we have seen that it is quite effective tool that can and should be used in their trading systems.
The theme of the Moving Average on the forum