The Centreline Crossover Trading Strategy
Previously in the first article of our MasterClass on MACD, we talked about what MACD is and how to use it while making trading strategies. Check out the first MACD Masterclass if you haven’t already. In this article, we’ll be talking about the most basic centreline crossover trading strategy using the MACD indicator to generate buy/sell signals. We’ll also be talking about stop-loss and false signal filtering while implementing it on Mudrex. We’ll be discussing the following topics in-depth with screenshots of Mudrex’s strategy canvas wherever necessary:
- Centreline Meaning
- Crossover Meaning
- Strategy Description
- False Signal Filtering
- Stop Loss Implementation
- Trade Analysis
As mentioned in the previous article, MACD is the difference of a shorter and a longer Exponential Moving Average. The 12-EMA is the shorter, more volatile moving average which reacts to recent price changes. The 26-EMA on the other hand is the longer, smoother moving average which does not change abruptly with high-frequency price changes.
This means that when the 12-EMA is greater than the 26-EMA, the recent prices are gaining momentum and an uptrend can be foreseen. Whereas when the 12-EMA is smaller than the 26-EMA, the recent prices are losing momentum and a downtrend is expected in the near future. Now since the MACD line is the difference of 12-EMA and 26-EMA, the zero line can be defined as the centreline and trades can be placed when MACD becomes positive or negative.
The centreline divides the canvas into bullish and bearish regions. The MACD is positive (above the centreline), it means that 12-EMA > 26-EMA and the market has a bullish sentiment. When MACD is negative (below the centreline), 12-EMA < 26-EMA and the market has a bearish sentiment.
- Bullish Centreline Crossovers: When MACD crosses up the centreline, it is a bullish signal and we can expect an uptrend in the near future.
- Bearish Centreline Crossovers: When MACD crosses down the centreline, it is a bearish signal and we can expect a downtrend in the near future.
The MACD will remain positive when there is a sustained uptrend. The MACD will remain negative when there is a sustained downtrend.
We’ll be using the default look-back periods of 12 and 26 for the shorter and longer EMA. However, you can change it as per your trade frequency and risk appetite. Traders can consider using the setting MACD(5,42,5). When used on the daily chart, this sets the fast EMA to a week’s worth of data, the slow EMA to two months’ worth of data. Other popular pairs are 24-52 and 34-89.
Buy and sell conditions are fairly straightforward-
- Buy when: MACD Line crosses up 0
- Sell when: MACD Line crosses down 0
Building on Mudrex
Indicator block for the buy condition of MACD crosses up 0 looks like this:
Indicator block for the sell condition of MACD crosses down 0 looks like this:
False Signal Filtering
The MACD is not a magical solution to determining where financial markets will go in the future. Taking MACD signals on their own is a risky strategy. Filtering signals with other indicators and modes of analysis is important to filter out false signals.
With respect to the MACD, when a bullish crossover (i.e., MACD line crosses above the signal line) occurs, yet the security’s price declines, it is referred to as a “false positive”. When a bearish crossover occurs (i.e., MACD line crosses below the signal line), yet the security’s price increases, it is deemed a “false negative”.
Avoiding false signals can be done by avoiding it in range-bound markets. Other ways can be using MACD with other technical indicators like RSI or Stochastic for a double confirmation of the trend. However any downsides caused by a false signal can be taken care of by using stop-losses and trailing stop-losses.
With a stop-loss order, if a share price dips to a certain set level, the position will be automatically sold at the current market price, to stem further losses. For example, if you placed a bullish buy order at $500 using the above strategy, but the signal turns out to be a false positive and the prices instead of rising, start falling. This is where with the help of a stop loss you can minimize the downside. With a stop-loss of say 5%, a sell order will be placed automatically if price falls beyond $475 booking a loss of 5% but hedging any further downsides.
Trailing Stop Loss
Traders can enhance the efficacy of a stop-loss by pairing it with a trailing stop, which is a trade order where the stop-loss price isn’t fixed at a single, absolute dollar amount, but is rather set at a certain percentage or dollar amount below the current market price. When the price increases, it drags the trailing stop along with it. Then when the price finally stops rising, the new stop-loss price remains at the level it was dragged to, thus automatically protecting an investor’s downside, while locking in profits as the price reaches new highs.
For example, if your purchase price was $500 with a trailing stop loss of 4%, the immediate effective stop-loss value will be at $480. Now if the market price climbs to 700 USD, your trailing stop value will rise to $680. If now for some reason the price begins to fall beyond $680, a sell order will be placed locking in profits so far, while hedging any further downsides.
In our strategy, we will be using a trailing stop-loss of 5% solely for experimental purposes. You can choose your own values depending upon the market volatility and risk tolerance by backtesting on Mudrex.
Overall strategy looks like this:
Look how a strategy buy signal was called when the MACD Line touched and crossed up the centreline in the following trade:
A trailing stop order [marked as ‘L’ in the above graph] was called when the prices fell by more than 5% of the peak price. If we had not used a stop-loss, the sell signal would’ve been generated 4-5 candlesticks later when the MACD line crossed below zero leaving behind the profits and booking in more losses than the trailing stop order.
This is how important false signal filtering can be when it comes to preventing losses due to false signals. In the upcoming article of our MasterClass on MACD, we will be talking about the signal line crossover strategy with other concepts like take profit and trailing take profit.
Stay tuned, and invest with Mudrex today!
A few quick references below: