DefineGlobalColor

DefineGlobalColor ( CustomColor color );

Description

Defines a named color for a plot with a default color value. This color can be changed in the menu.

Input parameters

Parameter Default value Description
name - Defines the name of the color.
color - Defines color to be used with specified name.

Example

DefineGlobalColor("Global1", CreateColor(128, 0, 128));
plot signal = high > Highest(high[1]);
plot NinetyPercent = 0.9*close;
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
signal.SetDefaultColor(GlobalColor("Global1"));
NinetyPercent.SetDefaultColor(GlobalColor("Global1"));

This example defines and uses a global color. This color can be changed in the Globals sub-tab of the Study Properties.