×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

RectangleSetFillColor

1,272 bytes added, 14:15, 25 August 2021
Created page with "Assigns the specified color to a rectangle's inside area with the specified ID number; returns a value of 0 if the color was successfully assigned, and a value of -2 if the sp..."
Assigns the specified color to a rectangle's inside area with the specified ID number; returns a value of 0 if the color was successfully assigned, and a value of -2 if the specified rectangle ID number is invalid.

== Usage ==
<syntaxhighlight>RectangleSetFillColor(ID,Color)</syntaxhighlight>

:'''Parameters'''
::''ID'' - a numerical expression specifying the rectangle ID number
::''Color'' - an expression specifying the rectangle fill color
::Rectangle color can be specified by a numerical expression representing an RGB color number or a legacy color value, or by one of 17 base color words.

== Notes ==
A rectangle-specific ID number is returned by [[RectangleNew]] when the rectangle is created.

== Example ==
Assign the color blue to the rectangle's inside area with an ID number of 1:
<syntaxhighlight>Value1=RectangleSetFillColor(1,Blue);</syntaxhighlight>
Assign the RGB color 2138336 (Orange) to the rectangle's inside area with an ID number of 2:
<syntaxhighlight>Value1=RectangleSetFillColor(2,2138336);</syntaxhighlight>
Assign the legacy color 4 (Green) to the rectangle's inside area with an ID number of 3:
<syntaxhighlight>[LegacyColorValue=True];
Value1=RectangleSetFillColor(3,4);</syntaxhighlight>

[[Category: Rectangle Drawing]]

Navigation menu