MACD Signals Backtester

Backtest the up and down signals in the MACD indicator across different markets, time frames, and settings to find the most profitable setups

youtube-video-thumbnail
MACD Indicator Explained!

Make sure to watch Part 1 first, in which we crack open the MACD Indicator and explain each of the different components within.

Introduction

The MACD Signals Backtester in ThinkOrSwim is a tool that allows traders to test the effectiveness of using up and down signals generated by the MACD indicator as their sole trading strategy. By running simulations on various markets, time frames, and settings, traders can optimize their use of the MACD indicator to fit their trading style.

Takeaways:

  • The MACD Signals Backtester is a tool in ThinkOrSwim that allows traders to test the effectiveness of using up and down signals generated by the MACD indicator as a standalone trading strategy.
  • The backtester can be used to test different markets, time frames, and settings to optimize the use of the MACD indicator for a given trading style.

*Note: We are using the MACDStrat Backtester for the ThinkOrSwim platform in this tutorial.

With a basic understanding of the MACD Signals Backtester, we can now move on to using it to test the effectiveness of using up and down signals as standalone trading indicators.

By simulating a strategy that buys whenever an up signal is generated and sells whenever a down signal is generated, we can see how well this strategy performs in different markets, time frames, and settings.

Let's dive into the backtester and explore how it can be used in this context.

 

MACD Signals Backtester for ThinkOrSwim 

In order to use the MACD Signals Backtester in ThinkOrSwim, we first need to load it onto our charts. This is a simple process that can be done by following a few steps in the ThinkOrSwim platform.

  1. Open the ThinkOrSwim platform and load the MACD Signals Backtester by clicking the Studies icon, switching to the Strategy tab
  2. Search for "MACD Strat"
  3. Double-click the MACD Strat to load it onto the chart.
  4. Load the MACD indicator onto the chart by double-clicking it from the Studies tab. Make sure the settings are set to 12, 26, 9, and Exponential.
  5. Enable the breakout signals by clicking the checkbox next to "Show Breakout Signals".
  6. Click "Apply" to apply the changes.
  7. If you do not see the P/L histogram at the bottom of the chart, click the "Global Strategy Settings" button to enable it. The P/L histogram will show you a quick gauge of the strategy's trade expectancy. Use this to assess whether the strategy is likely to be profitable or not.
  8. Use the backtester to run simulations on different markets, time frames, and settings to see how well the strategy performs in different conditions.
  9. Use the results of the simulations to optimize the use of the MACD indicator for your trading style.

Now that we have the MACD Signals Backtester loaded onto our charts, we can begin using it to test the effectiveness of using up and down signals as standalone trading indicators.

As we mentioned earlier, this involves simulating a strategy that buys whenever an up signal is generated and sells whenever a down signal is generated. By doing this, we can see how well this strategy performs in different markets, time frames, and settings.

In the next section, we will go through the process of using the backtester to run different tests of our own, and analyze the results.

This will help us understand how the MACD indicator performs in different market conditions and allow us to optimize its use for our own trading style.

 

Backtest 3 Different Ways

In this section, we will use the MACD Signals Backtester to test the effectiveness of using up and down signals as standalone trading indicators.
We'll test on:

  1. Different markets
  2. Different time frames
  3. Different settings.

By running simulations on various combinations of these factors, we can gain a better understanding of how the MACD indicator performs in different market conditions and can adjust our use of the indicator accordingly.

 

Different Markets

The results of our backtests on different markets were clear and consistent.

AAPL outperformed all other markets tested, with QQQ, DIA, and SPY also showing signs of some positivity. MSFT, on the other hand, was the worst performer, with negative results across the board. This is surprising given AAPL's strong performance and suggests that the MACD indicator may be more effective for certain markets than others.

These findings highlight the importance of backtesting different markets when using the MACD Signals Backtester.

The benefits of backtesting different markets include:

  • Identifying the markets that are most likely to be profitable using a given trading strategy
  • Avoiding markets that are not well-suited to a given strategy
  • Optimizing the use of the MACD indicator for a given trading style.

By doing this, traders can identify the markets that are most likely to be profitable using a given trading strategy and avoid those that are not well-suited to the strategy.

 

Different Time Frames

After conducting backtests on different time frames, we found that the up and down signals were consistently profitable on both the AAPL Daily time frame and the 1-hour time frame.

These results suggest that the strategy of using up and down signals as standalone trading indicators is effective for both shorter swing traders and longer-term trend traders.

What we learned through the two different backtests was:

  • Leveraging different time frames allows traders to adapt their trading strategies to their own trading style and goals
  • And, this can help traders identify the most profitable time frames for their strategies and avoid those that are not well-suited to their style

Time frames are a powerful tool in your arsenal; choose the one that best matches your trading style, instead of trying to find a strategy and which time frame it works best on.

 

Different Settings

In this section, we tested the MACD Up and Down Signals using different settings to see how the P/L would fluctuate. We tested the following settings:

  • Slow length: We tested slow lengths of 12, 26, 38, and 50. Increasing the slow length led to a decrease in the P/L.
  • Fast length: We tested fast lengths of 3, 8, and 12. Changing the fast length did not produce consistently positive results.
  • MACD length: We tested MACD lengths of 9, 50, and 5. Using a MACD length of 50 led to negative results.
  • Average type: We tested average types of exponential and simple. Using a simple average type led to negative results.

Overall, our backtests showed that using the default settings of 12, 26, 9, Exponential was the most effective for the MACD. This is useful information for traders who are looking to use the backtester to develop their own trading strategies.

 

Conclusion

In conclusion, the MACD Signals Backtester is a valuable tool for traders looking to optimize their use of the MACD indicator.

By running simulations on different markets, time frames, and settings, traders can gain a better understanding of how the MACD indicator performs in different conditions and adjust their use of the indicator accordingly.

The key takeaways from our tests were:

  • AAPL outperformed all other markets
  • The daily time frame outperformed the hourly time frame, but both were consistently profitable
  • Using the default MACD settings outperformed most other tested settings.

By incorporating these findings into their trading strategy, traders can improve their use of the MACD indicator and potentially improve their overall trading performance.

I hope you found this second tutorial in our MACD video series to be helpful in your trading journey.

Take care, and good luck trading!

Table of Contents
    Add a header to begin generating the table of contents

    Trade Like a Pro, With the Pros