TL_SetColor (Reserved Word)

image\trumpet2.gif Disclaimer

This reserved word changes the color of the specified trendline.

Value1 = TL_SetColor(Tl_ID, Color)

Tl_ID is a numeric expression representing the ID number of the trendline whose color you want to change, and Color is one of the EasyLanguage supported colors. See EasyLanguage Colors for a list of valid colors.

Value1 is any numeric variable or array. You must assign the trendline reserved word to a numeric variable or array so that you can determine whether or not the reserved word performed its operation successfully.

Remarks

When the reserved word performs its operation successfully, a 0 is returned. When a reserved word cannot perform its operation, it returns an error code. For a list of error codes, see EasyLanguage Drawing Object Error Codes.

  It is important to remember that if an invalid ID number is used, the reserved word will return a value of -2 and no additional operations will be performed on any trendlines by the trading strategy, analysis technique, or function that generated the error.

Example

To set the color of the trendline referenced by Value99 to yellow, you would write either of the following:

TL_SetColor(Value99, 65535);

TL_SetColor(Value99, Yellow);

To obtain the error code (or 0 when no error) returned by the reserved word, you need to assign the reserved word to a numeric variable, as follows:

Value1 = TL_SetColor(Value99, 65535);

See Also

TL_Delete

TL_GetActive

TL_GetAlert

TL_GetBeginDate

TL_GetBeginTime

TL_GetBeginVal

TL_GetColor

TL_GetEndDate

TL_GetEndTime

TL_GetEndVal

TL_GetFirst

TL_GetNext

TL_GetValue

TL_New

TL_SetBegin

TL_SetEnd

Trendline (class)