Need of MACD with coloured bar
- This topic has 6 replies, 2 voices, and was last updated 3 years ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › Need of MACD with coloured bar
Hello all,
I am looking for a MACD with colour on the bars. So if one bar is lower than the previous, then it would be a different shade colour. If it raises above the previous bar, then the colour would go back to the original shade. The same goes for the bars below the base line (0 line). I have found one here, which I downloaded, but the data it displays does not match the MACD on the prorealtime platform. Can anyone refer one to me?
Thanks in advance.
Hi, there is this one from Nicolas: https://www.prorealcode.com/prorealtime-indicators/macd-histogram-color/
I see, yes, that’s because it’s a histogram display of the “macdline”, you want the classic macd histogram. No problem, it can be easily adapted as follows to display the modified histogram instead:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
fast = 12 slow = 26 signalP = 9 myMACDline=exponentialaverage[fast]-exponentialaverage[slow] signal=exponentialaverage[signalP](myMACDline) myMACD=myMACDline-signal if myMACD>0 then if myMACD>myMACD[1] then r=0 g=100 b=0 else r=255 g=69 b=0 endif else if myMACD>myMACD[1] then r=50 g=205 b=50 else r=255 g=0 b=0 endif endif RETURN myMACD coloured(r,g,b) style(histogram) as "MACD histogram", signal coloured(255,0,255) style(line,2) as "signal line", myMACDline coloured(0,255,255) style(line) as "MACD line" |
Find exclusive trading pro-tools on