Need of MACD with coloured bar
Forums › ProRealTime English forum › ProBuilder support › Need of MACD with coloured bar
- This topic has 6 replies, 2 voices, and was last updated 2 years ago by Frankkeyo.
-
-
01/18/2022 at 1:07 PM #185823
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.
01/18/2022 at 1:15 PM #185824Hi, there is this one from Nicolas: https://www.prorealcode.com/prorealtime-indicators/macd-histogram-color/
01/18/2022 at 1:22 PM #18582501/18/2022 at 1:37 PM #185830I 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:
1234567891011121314151617181920212223242526272829303132fast = 12slow = 26signalP = 9myMACDline=exponentialaverage[fast]-exponentialaverage[slow]signal=exponentialaverage[signalP](myMACDline)myMACD=myMACDline-signalif myMACD>0 thenif myMACD>myMACD[1] thenr=0g=100b=0elser=255g=69b=0endifelseif myMACD>myMACD[1] thenr=50g=205b=50elser=255g=0b=0endifendifRETURN 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"01/18/2022 at 2:04 PM #18583201/18/2022 at 2:09 PM #18583301/18/2022 at 2:23 PM #185834 -
AuthorPosts
Find exclusive trading pro-tools on