AGet.jti()

ICE Data Services -

AGet.jti() Advanced GET Studies

Returns the series or values of the GET JTI study.

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.

 

Syntax

AGet.jti( FastMode , Length , ReturnSeries [, sym() | inv() ][, BarIndex ] )

 

Parameters

Parameter: Description: Default:
FastMode A boolean value. Should be equal True when you want the JTI to be extremely sensitive to any change in the trend strength. This setting should be used with caution due to the fact that it can give many false signals. . 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 when nBarIndex 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:

NONE = 0
NOISE = 1
LOW = 2
MEDIUM = 3
STRONG = 4

 

Notes

Only available in versions 11.8 or later.

 

Code Example

Creating and Using Series Example:

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;
}

See Also

Advanced GET Study Functions

AGet.xtl()