TL New BN

From MultiCharts
Revision as of 23:29, 27 February 2017 by Angelina (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Displays a trendline with the specified starting and ending points on the chart that the study is based on; returns a trendline-specific ID number required to modify the trendline.

Instead of separate Date and Time values or a single DateTime value, bar number of price series is used.

Usage

TL_New_BN (b_BarNumber, b_Price, e_BarNumber, e_Price);

Parameters

b_BarNumber - a numerical expression specifying the trendline starting point bar number.
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_BarNumber - a numerical expression specifying the trendline ending point bar number.
e_Price - a numerical expression specifying the trendline ending point price value.

Example

Display a trendline that will connect close price of the first bar of price series with the current close price.

once Value2=close; 

Value1=TL_New_BN(1,Value2,currentbar,Close); 

if Value1 <> Value1[1] then tl_delete(Value1[1]);