TL New Self Dt
From MultiCharts
Displays a trendline, with the specified starting and ending points, on the SubChart containing the study; returns a trendline-specific ID number, required to modify the trendline. Instead of separate Date and Time values, a single DateTime value is used. It allows accessing millisecond time stamps of the bar.
Usage
TL_New_Self_Dt (b_DateTime, b_Price, e_DateTime, e_Price) ;
Parameters
- b_DateTime - a numerical expression specifying the trendline starting point date and time; is indicated in the DateTime format. The integer portion of the DateTime value indicates the number of days that have elapsed since January 1st, 1900, and the fractional portion of the DateTime value indicates the fraction of the day that has passed since midnight.
- b_Price - a numerical expression specifying the trendline starting point price value (vertical position, corresponding to a value on the price scale of a chart)
- e_DateTime - a numerical expression specifying the trendline ending point time; the date is indicated in the DateTime format.
- e_Price - a numerical expression specifying the trendline ending point price value
Example
Display a trenline that will connect a close price 100 bars back with the current close price on the SubChart containing the study.
Value1=TL_New_Self_Dt(datetime[100], close[100], datetime, close);
if value1 <> value1[1] then tl_delete(value1[1]);