TL_SetExtRight (Reserved Word)

image\trumpet2.gif Disclaimer

Trendlines can be extended to the left or right. This reserved word enables you to toggle the trendline between extended to the right and not extended.

Value1 = TL_SetExtRight(Tl_ID, Extend)

Tl_ID is a numeric expression representing the ID number of the trendline, and Extend is a true/false expression that either extends the trendline to the right or not.

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 turns on the extend right status of the trendline referenced by Value99 (that is, the trendline will extend right):

Value1 = TL_SetExtRight(Value99, True);

Additional Example

The following statements draw a trendline at the low of a key reversal bar and extend it to the left and right:

Variable: ID(-1);

If Low < Low[1] AND Close > High[1] Then Begin
  ID
= TL_New(Date[1], Time[1], Low, Date, Time, Low);
  
Value1 = TL_SetExtRight(ID, True);
  
Value2 = TL_SetExtLeft(ID, True);
End
;

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)