Colouring price bars
Forums › ProRealTime English forum › ProBuilder support › Colouring price bars
- This topic has 10 replies, 2 voices, and was last updated 8 years ago by Nicolas.
-
-
08/20/2016 at 7:49 PM #11975
Can I please have help with colouring price bars as per my indicator below
If I=1 then price bar should be coloured blue
If i=0 then price bar should be coloured black
If i=-1 the price bar should be coloured red.
08/21/2016 at 9:46 AM #11981Changing colors of bars is only possible with version 10.3 and the new instruction DRAWCANDLE or DRAWBARCHART.
What version or broker are you using right now?
08/22/2016 at 9:34 AM #12021Thank you for the reply Nicholas.I am currently using the 10.2 on the IG brker platform.
08/22/2016 at 11:08 AM #12026Ok, so it’s not possible to draw custom bars then. The only possibility would be to draw dots of different colors above or below the price or maybe coloured histogram in a custom indicator below the price chart. What’s your preference?
08/22/2016 at 11:11 AM #12027Can you please then write me the code for both options.
Many thanks.
08/22/2016 at 1:14 PM #1203508/22/2016 at 1:21 PM #12036A1=AVERAGE[X]
A2=AVERAGE[X][1]
B1=AVERAGE[Y]
B2=AVERAGE[Y][1]
IF A1>B1 AND A1>A2 AND B1>B2 THEN
I=1
ELSIF A1<B1 AND A1<A2 AND B1<B2 THEN
I=-1
ELSE
I=0
ENDIF
RETURN I AS “INDICATOR”
08/22/2016 at 2:46 PM #12044Ok, so you already have everything needed to draw a cool histogram indicator to show your buy/sell signals :
12345678910111213141516X = 10Y = 20A1=AVERAGE[X]A2=AVERAGE[X][1]B1=AVERAGE[Y]B2=AVERAGE[Y][1]IF A1>B1 AND A1>A2 AND B1>B2 THENI=1ELSIF A1<B1 AND A1<A2 AND B1<B2 THENI=-1ELSEI=0ENDIFRETURN I coloured by I AS "INDICATOR"08/22/2016 at 2:55 PM #12047How about this being shown on the price bar above & below as dots as you mentioned.
08/22/2016 at 3:05 PM #12048Sorry,also wanted it as
I=1 coloured blue
I=-1 coloured red
I=0 coloured black
08/22/2016 at 3:08 PM #12049 -
AuthorPosts
Find exclusive trading pro-tools on