FILLCOLOR

Category: Graphical

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.

Syntax:

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.

Example:

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).

Additional Information:

  • The RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors.
  • The value of each color component (R, G, B) must be an integer between 0 (no contribution of that color) and 255 (maximum intensity of that color).
  • Using FILLCOLOR can enhance the visual representation of data in trading charts, making it easier to identify patterns or specific conditions set by the trader.

Understanding how to manipulate colors using RGB values can greatly enhance the customization and effectiveness of visual elements in trading strategies.

Related Instructions:

  • BACKGROUNDCOLOR graphical
  • ColorBetween instructions
  • COLOURED instructions
  • Logo Logo
    Loading...