MACD Histogram in Multiple Time-Frames
In the last article of our MasterClass on MACD, we talked about how to implement the signal line crossover trading strategy on Mudrex. Check out the last article on MACD Masterclass if you haven’t already. In this article, we’ll be talking about how to use MACD in multiple time-frames on Mudrex. We’ll be discussing the following topics in-depth with descriptions on trading charts and screenshots of Mudrex’s strategy canvas wherever necessary:
- MACD Histogram
- Multiple Time-Frames
- Histogram Crossover
- Strategy Description
- Trade Analysis
The MACD-Histogram measures the distance between MACD and its signal line (the 9-day EMA of MACD). Like MACD, the MACD-Histogram is also an oscillator that fluctuates above and below the zero line. It was developed to anticipate signal line crossovers in MACD. Because MACD uses moving averages and moving averages lag price, signal line crossovers can come late and affect the reward-to-risk ratio of a trade.
MACD Histogram: MACD-Signal Line
Since the Signal Line is the EMA of the MACD line, it lags the value of MACD. Therefore, when MACD > Signal Line, the market has an overall positive sentiment. When MACD < Signal Line, the market has an overall negative sentiment. Thus when MACD Histogram is positive, bullishness is anticipated. When MACD Histogram is negative, bearishness can be anticipated.
The histogram is positive when MACD is above its signal line. Positive values increase as MACD diverges further from its signal line (to the upside) and decrease as MACD and its signal line converge. The MACD-Histogram crosses the zero line as MACD crosses below its signal line. The indicator is negative when MACD is below its signal line. Negative values increase as MACD diverges further from its signal line (to the downside). Conversely, negative values decrease as MACD converges on its signal line.
If you are a short-term trader you might be focusing on short-term charts and trends. If you are a long-term trader you might be focusing on long-term charts and trends. However, when the short-term and long-term trends are in agreement you are probably right to be confident about a trade. This is the level of importance of using multiple time-frames to generate buy and sell signals.
We’ll be using a higher time-frame “trend chart” to define a predominant uptrend or a downtrend using MACD Histogram while a volatile lower time-frame “signal chart” to generate buy/sell signals using Signal Line Crossovers. By now it might be clear as to why we always use a higher time-frame or look-back period for setting a trend whereas a smaller time-frame or look-back period to generate buy/sell signals.
The following pairs of time-frames can be used to define your own trend/signal charts:
|Trend Chart (Predominant)||Signal Chart (Volatile)|
|15 to 30-minute||1-minute|
|4-hour||15 to 30-minute|
We’ve talked about False Signal Filtering in Part-2 of our MACD MasterClass. In this case, we’ll be using a higher time-frame MACD Histogram to determine the overall trend of the market. This will help filter the false signals while using the Signal Line Crossovers to generate the buy/sell signals in a smaller time frame.
In a higher time-frame [T1], if MACD Histogram is positive, the market is in an uptrend and we can start looking for buying opportunities in the lower time-frame [T2] signal line crossovers. Similarly, If the MACD Histogram in the higher time-frame is negative, the market is in a downtrend and we can look for selling opportunities in the lower time frame.
Hence the following buy/sell signals can be generated:
- MACD Histogram > 0 [T1]
- MACD crosses up Signal Line [T2]
- MACD Histogram < 0 [T1]
- MACD crosses down Signal Line [T2]
Building on Mudrex
We’ll be using the MACD indicator in its default settings of (12, 26, 9). We’ll use a higher time frame of 1D whereas a lower time frame of 1H. However, you can use your own pair from the aforementioned table. Also, note that the MACD Histogram is by the name of “Difference” in the indicator blocks on Mudrex.
The indicator block for the first buy condition of MACD Histogram > 0 [T1] is as follows. Notice the “tick interval” in the advanced parameter dropdown is set as T1:
Compare block for the second buy condition of MACD crosses up Signal Line [T2] is as follows. Notice the “tick interval” in the advanced parameter dropdown is set as T2:
Actual values of T1 and T2 (1H and 1D) are set while performing a backtest.
Joining the two blocks using an AND block to generate a buy signal:
Similarly, a sell signal can be generated from the conditions defined above. The overall strategy looks somewhat like this:
Setting T1 as 1H and T2 as 1D in the backtest settings:
This means that the overall trend will be set using the daily charts whereas the signals will be generated at local tops and bottoms in the hourly chart.
Running a backtest over the past 9 months gives us pretty decent results with a Sharpe Ratio of 1.87 whereas a Win Ratio of a whopping 100 which means all 5 trades ended up in profits.
Analysing the most recent trade in a 1D trend chart, look how the buy signal was generated while the Histogram was greater than zero whereas the sell signal was generated when the histogram became lesser than zero.
Analysing the same trade for signal line crossovers in a 1H signal chart, the buy signal was generated at a bullish crossover of MACD and Signal whereas the sell signal was generated at a bearish crossover of MACD and Signal:
The fact that there were minimum/none false signals generated shows how beautifully we filtered the false signals using MACD Histogram in multiple time-frames to determine the overall trend first and then generate the buy/sell signals. False signals can also be filtered by stop-losses however by booking in small losses.
One interesting thing here is that the Signal Line crossover can be replaced by MACD Histogram in a lower time frame because essentially the Histogram is the difference between MACD and Signal and thus zero-line crossover of the Histogram is the same as signal line crossover. In the next article of our MACD MasterClass, we will be talking about a very popular Double Cross Trading Strategy using the two most compatible indicators, MACD and Stochastic.
Stay tuned, and invest with Mudrex today!
Check out the Mudrex blog for more trading strategies.
A few quick references below: