**AGet.rsi()**Advanced GET Studies

Returns the series or values of theGET Relative Stength Indexstudy.

The RSI is calculated by finding the percentage of positive closes (the current close is higher than the previous close) to negative closes (the current close is lower than the previous close).

__Syntax__AGet.rsi(LengthRSI,LengthAvg,ExponentialAvg,ReturnSeries[,Series | sym() | inv()][,BarIndex] )

__Parameters__Parameter:

*Description: Default:*

*LengthRSI*

*An integer which represents the number of periods to use for calculation of RSI.*

n/a

*LengthAvg*

*An integer which represents the number of periods to use for calculation of the Moving Average.*

n/a

*ExponentialAvg*

*A boolean value. If this parameter is True the MA is calculated as exponential, if False - as simple.*

n/a

*ReturnSeries*

*Allows to choose what series of the GET Relative Stength Index study should be returned. To choose use the follwing constants:*

RSI_RSI = 0

RSI_AVG = 1

RSI_RSI = 0

RSI_AVG = 1

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 whennBarIndexis 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;function main(){ if(bInit == false){ xSer1 = getSeries(AGet.rsi(14, 7, false, RSI_RSI)); xSer2 = getSeries(AGet.rsi(14, 7, false, RSI_AVG)); xSer3 = getSeries(AGet.rsi(14, 3, false, RSI_AVG)); bInit = true; }; return new Array (xSer1,xSer2,xSer3);}

__See Also__Advanced GET Study Functions