AssignBackgroundColor ( CustomColor color );
Description
Sets a background color. Note that when used in script for a custom quote, this function sets the background color of the quote cell.
Input parameters
Parameter | Default value | Description |
---|---|---|
color | - | Defines color to be assigned to background. |
Example
plot ADX = ADX();
AssignBackgroundColor(if ADX > 20 then Color.DARK_ORANGE else Color.BLACK);
When used in custom quotes, this script will paint the cell background dark orange when a possible trend is detected (ADX>20), and black otherwise. Note that the ADX value is calculated for the last real bar only, so that change will only be visible if the condition is met at the last real bar.