The fnGetTrendLineValue function is used to get the value of a trend line at any point on the line.


After the fnGetTrendLineValue function has been added to a Drawing, it is configured by clicking the (+) button along the bottom of the Element.


The Function Configuration window allows you to select values for each parameter.



Parameter Name

Data type

Description

name

string

The name of the trend line.  All trend lines are identified by name.  The name should be unique. The pull-down menu provides sample names, but the text can be overwritten to any allowable name.  The name must be surrounded by double quotes, for example "myName". Avoid using blank spaces in the name: It may cause unpredictable behaviour.

shift

integer

The candle index on the price chart of where to capture the trend line's value. Zero is the currently forming candle, one is one candle to the left, etc.