The FILLCOLOR function in ProBuilder language is used to set the background color of graphical objects such as rectangles, circles, or text labels in charts. This function is particularly useful for distinguishing different graphical elements visually by filling them with specific colors defined using RGB (Red, Green, Blue) values.
FILLCOLOR(R, G, B)
Where R, G, and B are integers ranging from 0 to 255 that represent the intensity of the red, green, and blue components of the color, respectively.
Suppose you want to draw a rectangle on a chart with a green outline and a purple fill. You can use the FILLCOLOR function along with the COLOURED function to achieve this:
R = 255
B = 255
DRAWRECTANGLE(barindex, close, barindex[5], close[5]) COLOURED("green") FILLCOLOR(R, 0, B)
In this example, the DRAWRECTANGLE function is used to draw the rectangle. The COLOURED function sets the color of the rectangle’s outline to green, and the FILLCOLOR function sets the fill color to purple (RGB value 255, 0, 255).
Understanding how to manipulate colors using RGB values can greatly enhance the customization and effectiveness of visual elements in trading strategies.