Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Moving average combination that mimics the MACD

Hello all,

I'm looking to implement moving averages that basically mimic what the MACD shows. I understand the MACD line is the 12 day EMA - 26 day EMA, and the signal line is the 9 day EMA of the MACD line, but am having trouble translating this to moving averages, especially with the data history function.

Could anyone point me in the right direction?

2 responses

Why not just use talib.MACDEXT - MACD with controllable MA type

SMA = 0; EMA = 1; WMA = 2; DEMA = 3; TEMA = 4; TRIMA = 5; KAMA = 6; MAMA = 7; T3 = 8

Here it is