Returns the series or values of the GET XTL study.Syntax
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).
AGet.xtl( Length [, sym() | inv() ][, BarIndex ] )Parameters
Parameter: Description: Default:
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 whennBarIndex 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:Notes
NEITRAL = 0UP_TREND = 1DOWN_TREND = -1
Only available in versions 11.8 or later.Code Example
Creating and Using Series Example:See Also
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));}
Advanced GET Study Functions
AGet.jti()