TL_SetStyle (Reserved Word)
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 |
|
2 |
Tool_Dashed |
|
3 |
Tool_Dotted |
|
4 |
Tool_Dashed2 |
|
5 |
Tool_Dashed3 |
|
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);