Forums › ProRealTime English forum › ProBuilder support › PRT MACD CORRUPTED!? › Reply To: PRT MACD CORRUPTED!?
06/15/2018 at 11:47 AM
#73315
Hello GraHal,
Indeed as Despair wrote previously:
1 2 |
//The instruction for MACD Histogram (MACD line minus MACD signal) is: Return MACD[12,26,9](close) |
1 2 |
//The instruction for MACD (or MACD Line) is: Return MACDline[12,26,9](close) |
1 2 |
//The instruction for MACD signal is: Return ExponentialAverage[9](MACDline[12,26,9](close)) |
When most people are referring to “MACD”, they actually mean the “MACD Histogram”, hence the naming.
You can check that the results returned are the same as if you calculate the indicator yourself:
1 2 3 4 5 6 7 |
p = 12 q = 26 r = 9 MyMACDLine = EXPONENTIALAVERAGE[p](CLOSE) - EXPONENTIALAVERAGE[q](CLOSE)//FastMA - SlowMA MyLine = EXPONENTIALAVERAGE[r](MyMACDLine) RETURN MyMACDLine - MyLine AS "MACD Histo", 0 |
Finally, in assisted creation mode, it is true when you use the dropdown menu, the fact that the MACD line is just named MACD can create confusion because it’s not the same logic as in the rest of the Software. I’ve just asked my colleagues to correct this in a future update to display MACDLine in this dropdown menu as well.
Regards,
Pierre
…