TL New BN: Difference between revisions
From MultiCharts
(Created page with "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 trend...") |
No edit summary |
||
Line 23: | Line 23: | ||
if Value1 <> Value1[1] then tl_delete(Value1[1]); </syntaxhighlight> | if Value1 <> Value1[1] then tl_delete(Value1[1]); </syntaxhighlight> | ||
[[Category:Trendline Drawing]] |
Latest revision as of 23:29, 27 February 2017
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]);