Returns the series or values of the GET JTI study.Syntax
The Joseph Trend Index (JTI) is based upon a trend tracking and strength algorithm developed by Tom Joseph. This indicator can be used in conjunction with the Expert Trend Locator (XTL) as a confirmation of a trend due to the fact that they are independent calculations and are not related.
AGet.jti( FastMode , Length , ReturnSeries [, sym() | inv() ][, BarIndex ] )Parameters
Parameter: Description: Default:
n/a Length Allows to choose what length of trend the JTI should display. To choose use the follwing constants:
JTI_SHORT = 0
JTI_MEDIUM = 1
JTI_NORMAL = 2
JTI_LONG = 3
n/a ReturnSeries Allows to choose what series of the GET JTI study should be returned. To choose use the follwing constants:
JTI_JTI = 0
JTI_STRENGTH = 1
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. Series Object for the Strength series consists of the set of constants shown below.
Returns a single value when nBarIndex is specified. The function returns a single value of the Strength series from the set of constants shown below.
A set of constants for the Strength series:Notes
NONE = 0NOISE = 1LOW = 2MEDIUM = 3STRONG = 4
Only available in versions 11.8 or later.Code Example
Creating and Using Series Example:See Also
var bInit = false;var xSer1 = null;var xSer2 = null;function main(){ if(bInit == false){ xSer1 = getSeries(AGet.jti(false, JTI_NORMAL, JTI_JTI)); xSer2 = AGet.jti(false, JTI_NORMAL, JTI_STRENGTH); bInit = true; }; var nSer2 = xSer2.getValue(1); switch (nSer2){ case NONE: setBarFgColor(getChartBG()); break; case NOISE: setBarFgColor(Color.RGB(0xFF,0xFF,0x00)); break; case LOW: setBarFgColor(Color.RGB(0x00,0xFF,0x00)); break; case MEDIUM: setBarFgColor(Color.RGB(0x00,0x94,0xFF)); break; case STRONG: setBarFgColor(Color.RGB(0xFF,0x00,0x00)); break; }; return xSer1;}
Advanced GET Study Functions
AGet.xtl()