TL_SetStyle (Reserved Word)

image\trumpet2.gif Disclaimer

This reserved word enables you to modify the style of the specified trendline.

Value1 = TL_SetStyle(Tl_ID, Style);

Tl_ID is a numeric expression representing the ID number of the trendline whose style you want to change, and Style is a numeric expression representing the new line style for the trendline.

The possible styles are:

Style Value

Style Reserved Word

Example

1

Tool_Solid

image\tl_setstyle_tool_solid.gif

2

Tool_Dashed

image\tl_setstyle_tool_dashed.gif

3

Tool_Dotted

image\tl_setstyle_tool_dotted.gif

4

Tool_Dashed2

image\tl_setstyle_tool_dashed2.gif

5

Tool_Dashed3

image\tl_setstyle_tool_dashed3.gif

You can use either the number or the reserved word. The style only applies when the trendline is set to the thinnest size, which is zero (0).

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

The following sets the line style of the trendline referenced by Value99 to Tool_Dotted (dotted):

Value1 = TL_SetStyle(Value99, 3);

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)