I’ve been so busy, gotten sick, had work deadlines, that I’ve been away from the blog for ages. I’m making a renewed push at all my projects, so here’s an indicator that was requested by a reader: A MACD that follows an symbol independent of the symbol of the underlying chart. You could use this to plot the MACD of the VIX onto a chart of the VXX ETF for example. Or to plot the broad market SPY on an individual stock you are watching.
Anyway, here’s how to do it:
A MACD is just a distance between two moving averages. The histogram is a distance between the MACD line and a moving average of that line. So we will build our own MACD from scratch using data from the symbol we are interested in.
Traditionally, the MACD uses exponential moving averages. I don’t know that it matters, but I do prefer exponential over simple because of the way they blend out past data. So we start with the inputs for the symbol and the MACD periods:
Next we create the two exponential averages for the MACD line:
Add some formatting and that’s it!
This indicator is free. You can download “AltMACDSTUDY.ts” from “Released Thinkscript Studies” on my Google site. Thanks for (hopefully still) reading!