MACD Crossover Trading Strategy

Discussion in 'Trading Strategies' started by Dary, Nov 4, 2013.

This is the TIMETOTRADE forum. Use the TIMETOTRADE Trigger Trading Technology™ to execute your trades when your Price, Candlestick, Trend Line and Technical Analysis chart conditions are met - no coding required. Trade directly in the world’s global markets. Backtest your Trading Strategies. Calculate your UK HMRC Capital Gains Tax liabilities. Manage your Investment Club. Create a FREE account today.

  1. Dary

    Dary Dary McGovern Staff Member

    MACD Crossover Strategy Overview

    The MACD (Moving Average Convergence Divergence) indicator is one of the classic indicators commonly encountered when starting to familiarise yourself with technical analysis. It is a trend-following indicator that measures the difference between two Exponential Moving Averages (EMAs).

    The MACD indicator consists of two lines, mainly a MACD and Smoothed MACD (SMACD) line. The MACD is based on the difference between two EMAs. The SMACD 'signal line' is the Moving Average of the MACD.

    The indicator itself fluctuates above and below zero, the ‘centre line’. When the MACD is equal to zero, the long and short period EMAs upon which the MACD is calculated, are equal. A strategy based on the MACD crossing zero, will have the same trading characteristics as the Two Exponential Moving Average Trading Strategy discussed on another thread.

    When MACD is above zero the shorter term average is higher than the longer term average implying positive momentum and bullish trading sentiment. When MACD is negative, the fast exponential moving average is lower than the longer term exponential moving average, implying negative momentum and bearish trading sentiment. When the MACD crosses the SMACD is can indicate a short term change of trend.

    This thread discusses a strategy based on MACD / SMACD crossovers.


    MACD Crossover Strategy Execution

    Trades will be set up to switch from a long position to a short position when there is a Negative MACD crossover i.e. the MACD falls below the SMACD, then switch from a short position to a long position if there is a Positive MACD crossover i.e. the MACD rises above the SMACD.

    Add the MACD indicator to the chart settings, then create a new trigger when the MACD rises above the SMACD as illustrated:

    MACD_1.png

    Now associate a trade with the alert as illustrated and click on the 'Pause' or 'Activate' buttons. If you just want to backtest the alert and not forward test it, then click on the Pause button. Activating the alert will start the processing of executing the strategy and generating trades:

    MACD_2.png

    In this example the order type will be set to 'buy switch', which means an order will be sent to buy if there is a short position to close, followed by an order to buy to open a long position. If there is not short position, then only a single order to buy to open a long position will be sent.

    After activating or pausing the alert, go back to the chart and click on the negative crossover alert trigger on the MACD chart as illustrated:

    MACD_3.png


    For the second alert, a trade will be set up to sell switch, in order to switch from a long to a short position by selling, when there is a negative MACD crossover as illustrated:

    MACD_4.png



    MACD Crossover Strategy Analysis

    In this example the strategy was tested on the GBP/USD forex pair, using the default MACD settings of 12, 26, 9 using a 1 hour interval chart. When back tested over 3 months of hourly data the strategy was successful as displayed in the following backtest results summary; however it does high light the strength and weakness of this strategy:

    MACD_5.png

    Although the strategy was successful, from examining the blue profit line, it generated an accumulating loss over the first 6 weeks. However during the later period it was profitable. The reason for this is that during the first 6 weeks the trading was quite choppy and did not trend for significant periods of time (up arrows are 'buy'; down arrows are 'sell'; grey arrow is an opening trade; green is a profitable trade; blue is a losing trade):

    2013-11-4_CX-GBPUSD (2).jpg


    During the later period of the back test there were longer trending periods which offset the choppy price action, and the winning trades where typically twice as profitable when compared to the losses of the losing trades:

    2013-11-4_CX-GBPUSD (1).jpg



    MACD Crossover Strategy Conclusion

    Strategies based on the MACD crossing the SMACD are best suited to trending markets were there are extended periods of time with the market moving in one direction. Choppy price action will typically result in relatively small, but frequent losses than can quickly accumulate.

    A very useful implementation of a MACD crossover strategy is to use it to exit a position after a break out move. For example if there is a news event that triggers a bullish rally and you are in a long position, then a trade can be set up to take profit when there is a negative MACD crossover. Unlike the examples above, the trade would be set up to simply sell if in a long position and execute once as illustrated:

    MACD_7.png

    Note that when the alert is triggered, 'if long, execute trade' and that the 'reactivate the alert after' drop down is set to never. This means that only sell to close the long position on the MACD crossover if you haven't already taken profit and do not repeat the alert - execute once then pause the alert.
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.
  2. Dary

    Dary Dary McGovern Staff Member

    As discussed in the strategy conclusion, the MACD is very useful when deciding when to exit a position after a strong move. For example in the following chart the ECB announced an Interest Rate cut at 12.45, which acted as a strong catalyst for a break out move to the downside; the MACD provided an indication of when to take profit:

    2013-11-7_CX-EURUSD.jpg
     

    Apply for a trading account today and get the superb Trigger Trading™, Taxation and Investment Club Pro Package for FREE. Get your trading advantage.

Share This Page

Open a FREE TIMETOTRADE account today:
Execute your Trigger Trading™ strategies automatically in the world’s global markets. Apply Now to try our superb platform and get your trading advantage.
170+ Technical Analysis and Candlestick Pattern Indicators - learn more
Back Test Trading Strategies - learn more
Manage your Portfolio and calculate UK HMRC Capital Gains liabilities and SA 108 CGT Return - learn more
Manage your Investment Club and generate UK HMRC Investment Club Tax Return Form 185 - learn more