MACD histogram candle colours for high and low
- This topic has 5 replies, 2 voices, and was last updated 8 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › MACD histogram candle colours for high and low
Hi all,
I have created a MACD Histogram and i’m trying to get the bars change colour to show a change from one bar to the other, example –
if historgam bar is coloured RED, this indicates a decrease value when compared to the previous bar and if histogram bar is greater than the previous bar this is coloured Green. this works up to the zero line and on both uptrend and downtrend.
I’ve supplied an attachment showing what i would like to programme
I’ve been looking at the manual provided by Pro RealTime but the “COLOURED” syntax only works if the variable has not been allocated, what if the variable has already been declared?
when i set up the indicator i can change the colour to either one or the other and when they cross the zero line it is either GREEN (0,255,0) or RED (255,0,0) what if i want to get bars next to each other to have different colours?
I can’t see how to program this in and don’t see any indicators showing this either on this forum?
any help would be gratefully received.
NickleB
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 33 34 35 36 37 38 39 40 41 42 43 44 |
// MACD DID V2 06.07.2014 MMR = exponentialaverage [p](close) MML = exponentialaverage [p1](close) monMACD = MMR - MML C1 = monMACD > monMACD [ 1 ] AND monMACD < 0 If C1 then aa = monMACD bb = 0 cc = 0 dd = 0 endif C2 = monMACD > monMACD [ 1 ] AND monMACD > 0 If C2 then aa = 0 bb = monMACD cc = 0 dd = 0 endif C3 = monMACD < monMACD [ 1 ] AND monMACD < 0 If C3 then aa = 0 bb = 0 cc = monMACD dd = 0 endif C4 = monMACD < monMACD [ 1 ] AND monMACD > 0 If C4 then aa = 0 bb = 0 cc = 0 dd = monMACD endif Return 0 as " zero ",monMACD as "monMACD" , aa as " aa " , bb as " bb " , cc as " cc " , dd as " dd " // Variables: // p = 8 = periode MMR // p1 = 17 = periode MML // aa = vert // bb = vert // cc = rouge // dd = rouge |
Find exclusive trading pro-tools on