Plot moving averages behind bars
- This topic has 5 replies, 3 voices, and was last updated 5 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 › Plot moving averages behind bars
Tagged: drawcandle
I don’t think that there is a setting that can achieve this but it is certainly possible to create an indicator that first draws the averages and then draws candles. When applied to the price chart the candles should then be on top of the averages. In fact I think that just drawing candles should put them on top of any indicators but my platform is not open at the moment to test this.
See here for the DRAWCANDLE instruction:
https://www.prorealcode.com/documentation/drawcandle/
I don’t think that there is a setting that can achieve this but it is certainly possible to create an indicator that first draws the averages and then draws candles. When applied to the price chart the candles should then be on top of the averages. In fact I think that just drawing candles should put them on top of any indicators but my platform is not open at the moment to test this.
See here for the DRAWCANDLE instruction:
Yes, it works!
1 2 3 4 5 6 7 8 9 10 |
r = 0 g = 0 b = 0 IF close > open THEN b = 255 ELSIF close < open THEN r = 255 ENDIF DRAWCANDLE(open,high,low,close) COLOURED(r,g,b,255)// BORDERCOLOR(R,G,B) RETURN |
Sorry I am new to this and I’m having trouble with the formula. What do I have wrong? When I apply this indicator to a chart does it override the “Price” that is already there?
Thanks
1 2 3 4 5 6 7 |
IF close > open THEN BARCOLOR = COLOURED(0,0,153) ELSIF close < open THEN BARCOLOR = COLOURED(153,0,0) ENDIF DRAWBARCHART(open,high,low,close) BARCOLOR RETURN |
I may have fixed it. Thanks for the help. Just one question. Do I add this as an indicator and does it override the price settings?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
r = 0 g = 0 b = 0 IF close > open THEN R = 0 G = 0 B = 153 ELSIF close < open THEN R = 153 G = 0 B = 0 ENDIF DRAWBARCHART(open,high,low,close) COLOURED(r,g,b,255) RETURN |
I called the indicator “Draw Bar Chart”. Do I add it like I have done in this image.
Add the indicator to a price chart via the spanner in the price chart label. It does not override the price/candles/bars drawn on the chart but simply draws on top of them so make sure your chart is set to display the same type of price bars/candles etc.
Find exclusive trading pro-tools on