Moving average is one of the technical indicators that is almost a household name. Everybody who has ever seen a market chart knows that moving averages exist. Some exchanges even print them on their charts by default.
When the same technical indicator gets used by everyone, it can be a good thing: The fact that most traders act on the indicator contributes to the fact that it works. On the other hand, it can also lead to people trying to front-run one another.
Luckily, MA, or moving average, is a very modular indicator that exists in many variations of it. Using a variant of MA is usually a good idea if you do it with a specific purpose in mind. Algo developers also use MAs as a part of their strategy - that is, not relying only on them, but still working with them.
- What can MAs do for you?
- List of Moving Average variations
- SMA, EMA, WMA, TMA, Hull and ALMA.
- Interesting TradingView strategies and scripts linked.
- Moving Average settings in crypto
What does moving average do for you as a trader?
- Moving average is the rolling average price over the past X periods.
- On a 1D chart, the MA(20) will be the average value of the price over the past 20 days.
The purpose of any kind of the moving average is trend analysis - to smooth out price action to bring up the trend.
Markets are volatile, on the daily they fake-out, overshoot or start a panic only to return back to where that started in a few hours.
Moving average takes this short-term volatility out of the picture and lets you focus on the longer trend instead. That way an MA gives a trader a clear view of what has happened, and consequently also what might likely come next.
- To illustrate the purpose of MAs better: You could also do the opposite and detrend your charts to remove the trend and only see the daily back-and-forth volatility. That can also be traded - we have volatility contracts, different types of grid trading and also scalping.
Why do algo traders use moving averages?
Moving averages form one of the building blocks in most serious automated trading strategies as an indicator of overall direction of the market.
A trading bot algorithm needs that general, big-picture information to be able to decide which direction you want to trade - up or down - and which trend we are in at current moment.
This is the information that algo traders use MA for: “Is it the time to look for a long entry or for a short entry?” The entry point itself is not determined yet, only the direction.
Moving average is one of the tools that give us this insight.
Is it the best one? In my opinion not.
But even indicators like Bollinger Bands are variants of a moving average - and bbands do work pretty well.
Modifications and variations of MA
SMA - simple moving average
The simple or standard moving average is the basic moving average. It gives you the plain average of prices over X periods.
Traders use SMA for trend analysis, and at that usually by looking at the crossover of a fast one and a slow one. The SMA cross of 50 and 200 is the garden variety technical analysis that you will get on mainstream television.
In algo trading, it can be useful as a double-check that your algo is perceiving the trend right. While TMA or EMA may be better for that, SMA is simple enough to be available even on simple drag-and-drop bot trading platforms like Coinrule.
Interesting TradingView script: Regression channel made out of SMA, EMA and ALMA. It does something similar to Bollinger bands, except it plots the linear regression - the flat channel instead of the curvy bbands. Author recommends it for trend checking, it might be good as a base for automated grid trading on ranging markets too.
EMA - Exponential Moving Average
EMA is like SMA except it gives more weight to the more recent data points of price action.
That adjustment somewhat fixes the classic property of SMA, which is that it takes a long time until the moving average registers even quite sharp turns in price action.
The use is otherwise the same as with SMA.
Interesting TradingView script: Kahlman HullMA / WT Cross Strategy A strategy that uses exponential and Hull moving averages to work out the crossovers. The entries/exits are marked on the chart.
WMA - Weighted Moving Average
WMA runs on a similar idea as EMA. You can think of it as a younger sibling of EMA - the only difference is that WMA uses different weighting factors for the more recent price points (which makes it even more sensitive to changes in price than EMA).
That makes WMA pick up changes in trend faster than SMA or EMA, but will also retain more of the volatility noise. That means it is better suited for short term trades, not that much for trend analysis.
Interesting TradingView script: DayTradingFutures Cross-Strategy with WMA and a built-in helper to show you where to set your stops. The default way is based on average true range.
T3 or TMA - Triangular Moving Average
TMA stands for triangular MA. Triangular moving average makes an average of SMA points over the time span, which makes it way looser and smoother.
TMA is your trend analysis tool: It is loose and catches really only the trend. TMA will tell you nothing in ranging markets that move back and forth.
Interesting TradingView script: Triangular Moving Average (TMA) bands are like Bollinger bands, except they are made with TMA and therefore looser. If you use bands for scalping, using looser ones in certain markets will mean you will take more profits. You’ll have to backtest though.
ALMA - Arnaud-Legaux moving average
ALMA is a technical indicator based on Arnaud Legaux’s paper “Adapting Moving Averages to Market Changes”.
As a consequence, ALMA provides almost twice as many trading signals in comparison with SMA. Basically, it is much faster and sticks much closer to the price action.
This makes ALMA a good MA to get your stop loss position, if you want to keep your stops tight and your risk small.
The downside of the same property is that ALMA will give you a lot of false signals, because it just moves too fast. This will show especially if you try to do crossovers.
Interesting TradingView script: MA ribbon for traders who decide well based on visual intuition. This indicator prints a series of MAs in a ribbon. The ribbon is used for trend analysis - looking at the balance and distances of the ribbons determines the strength of the trend.
HMA - Hull Moving Average
HMA is a very interesting one. It is a WMA modified in a nonlinear way. HMA puts even more emphasis on recent price data than WMA. The idea is that HMA has got its own momentum, which makes it different from other moving averages.
But on top of that, the smoothing is improved as well. It takes in more data points than just the latest price average.
The result is an MA that is fast in trailing the price, but it is smooth enough to not pick up the noise of the short term volatility.
Thanks to the smoothing, Hull MA tracks the price closely but doesn’t give too many fake crossovers when you plot two of Hulls.
This makes Hull MA crosses (confirmed by more TA) good enough for entry and exit signals in forex and in your crypto scalping.
Interesting TradingView script: Double Hull MA v2
Moving averages timeframes and settings
- In crypto
Should you go for specific MA settings for crypto?
This is the same issue as with ichimoku settings for crypto.
Some traders set all their crypto indicators to spans of 28 or 30 instead of 20 or 21. This is done because crypto trades every day, whereas stocks do not - and stocks are where the convention of 20 or 21 comes from.
I do think this works better. It is then ~28-30 spans to represent a month and ~60 spans to represent two months (with some leeway).
Some traders like to shorten the months a bit, because volume is low at the weekends. Ultimately, test it. I adjust my settings based on the strength of the market too.
- In general
The fast-moving MA variations are popular among traders who trade intraday.
Even if you are a daytrader though, it is still a good practice to check longer time-frames. What you are looking to see is if the odds are generally in the favour of your direction these days or if you are about to make a contrarian trade.
Checking the “macro” mood is especially important if you are setting up an automated strategy.
When we trade manually, we often take into account information we don’t even realise we are seeing. It is a gut level thing because we have done it so many times that it doesn’t even have to register consciously.
But a trading bot does not have human judgement, it just executes. That’s why it is important to feed it context information as well.