AGet.ma()

ICE Data Services -

AGet.ma() Advanced GET Studies

Returns the average series or values of the GET Moving Average study.
The Moving Average displays the average price of an issue over a specified period of time.

 

Syntax

AGet.ma( Length , Offset , Exponential , Pivots , ReturnSeries [, Series | sym() | inv() ][, BarIndex ] )

 

Parameters

Parameter: Description: Default:
Length An integer which represents the number of periods to use for calculation.  n/a
Offset An integer which determines the number of periods the Moving Average should be shifted forward (+ number) or backwards (- number). n/a
Exponential A boolean value. Exponential Moving Average is used when this parameter is True, Simple Moving Average is used when this parameter is False. n/a
Pivots An integer which adjusts the number of Primary and Major Pivots used to calculate the best Length and Offset for the DMA. Is in range [1, 20]. n/a
ReturnSeries Allows to choose what series of the GET MA study should be returned. To choose use the follwing constants:
MA_MA = 0
MA_DMA = 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 when nBarIndex is specified.

 

Notes

Only available in versions 11.8 or later.

 

Code Example

Creating Series Example:

var bInit = false;
var xSer = null;
setPriceStudy(true);
function main() {
  if (bInit == false) {
    xSer = getSeries(AGet.ma(20, 0, false, 10, MA_MA));
    bInit = true;
  }
  return xSer;
}
 

See Also

Advanced GET Study Functions

AGet.maBands()