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

Clone Algorithm
51
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 57e1e844f395bd102ddf164a
There was a runtime error.