AGet.keltner()

ICE Data Services -

AGet.keltner() Advanced GET Studies

Returns the series or values of the GET Keltner study.
The Keltner study is a moving average-based indicator with bands above and below a moving average. The bands are based on volatility and are calculated using range or Average True Range (ATR).
Syntax
AGet.keltner( Length , Offset , Exponential , Multiplier , Basis , ReturnSeries [, Series | sym() | inv() ][, BarIndex ] )
Parameters
Parameter: Description: Default:
Length An integer which determines the length of the moving average.

 

n/a Offset An integer which determines how many bars to offset the study by.

 

n/a Exponential A boolean value. When true, the moving average will be exponential. When false, it will be a simple moving average.

 

n/a Multiplier A floating-point number which determines the multiplier of the range or ATR.

 

n/a Basis Allows to choose the range or Average True Range to calculate the band lines. To choose use the follwing constants:
KELTNER_RANGE = 0
KELTNER_TRUERANGE = 1

 

n/a ReturnSeries Allows to choose what series of the GET Keltner study should be returned. To choose use the follwing constants:
KELTNER_UPPER = 0
KELTNER_CENTER = 1
KELTNER_LOWER = 2

 

n/a Series | sym() | inv() [Optional]  Series Object or 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.
Returns a single value when nBarIndex is specified.
Notes
Only available in versions 11.8 or later.
Code Example
Creating Series Example:
var bInit = false;var xSer1 = null;var xSer2 = null;var xSer3 = null;setPriceStudy(true);function main(){        if(bInit == false){        xSer1 = getSeries(AGet.keltner(20, 0, false, 1, KELTNER_TRUERANGE, KELTNER_UPPER));        xSer2 = getSeries(AGet.keltner(20, 0, false, 1, KELTNER_TRUERANGE, KELTNER_CENTER));        xSer3 = getSeries(AGet.keltner(20, 0, false, 1, KELTNER_TRUERANGE, KELTNER_LOWER));        bInit = true;    };    return new Array (xSer1,xSer2,xSer3);}
See Also
Advanced GET Study Functions