AGet.xtl()

ICE Data Services -

AGet.xtl() Advanced GET Studies

Returns the series or values of the GET XTL study.
The XTL (eXpert Trend Locator) is a proprietary study Tom Joseph developed that uses a statistical evaluation of the market that can tell the difference between random market swings (noise) and directed market swings (trends).
Syntax
AGet.xtl( Length [, sym() | inv() ][, BarIndex ] )
Parameters
Parameter: Description: Default:
Length An integer which represents the number of bars used to calculate the study.

 

n/a sym() | inv() [Optional]  Function of sym() or inv() to determine symbol/interval source for the study.

 

Base sym/int BarIndex [Optional]  Bar index of series to retrieve.

 

n/a
Return Value(s)
Returns a Series Object when
nBarIndex is not specified. It consists of the set of constants shown below.
Returns a single value when nBarIndex is specified from the set of constants shown below.
A set of constants:
NEITRAL = 0UP_TREND = 1DOWN_TREND = -1
Notes
Only available in versions 11.8 or later.
Code Example
Creating and Using Series Example:
var bInit = false;var xSer = null;setPriceStudy(true);setColorPriceBars(true);function main(){        if(bInit == false){        xSer = AGet.xtl(35);        bInit = true;    };    var nSer = xSer.getValue(0);        if (nSer == null)        return;    if (nSer == UP_TREND) setPriceBarColor(Color.RGB(0x00,0x91,0xFF));    if (nSer == DOWN_TREND) setPriceBarColor(Color.RGB(0xFF,0x00,0x00));    if (nSer == NEITRAL) setPriceBarColor(Color.RGB(0xA0,0xA0,0xA4));}      
See Also
Advanced GET Study Functions
AGet.jti()