Can anyone provide the code for the standard MACD provided by Prorealtime? I would like to start with that and then modify from there on.
Thank you
Markus
There you go:
// MACD 12,26,9 (formula)
//
// https://en.wikipedia.org/wiki/MACD
// https://www.ig.com/uk/glossary-trading-terms/moving-average-convergence-divergence-definition
//
MyMACD = ExponentialAverage[12](close) - ExponentialAverage[26](close)
MySignalLine = ExponentialAverage[9](MyMACD)
MyHistogram = MyMACD - MySignalLine
RETURN MyMACD AS "Macd",MySignalLine AS "Signal",MyHistogram AS "Histogram"