AddLabel

AddLabel ( CustomColor color );

Default values:

color: Color.RED

Description

Adds a label with a text to the top-left graph corner. Note that when used in script for a custom quote, this function sets the text displayed in the quote cell.

Input parameters

Parameter Default value Description
visible - Defines condition upon which the label is displayed.
text - Defines text to be displayed in the label.
color Color.RED Defines color of the label.

Example

AddLabel(yes, if close > Average(close, 20) then "Uptrend" else "Downtrend");

Displays a label indicating "Uptrend" when the Close price is greater than its 20 bars average and "Downtrend" otherwise. If used in Custom Quotes, words "Uptrend" or "Downtrend" will appear in the quote cell, depending on whether the condition is fulfilled.