MAStudy()

ICE Data Services -

MAStudy()

 

  • MAStudy(Length, Offset, PriceSource, [StudyType], MovingAverageType)

 

Members

study.getValue(MAStudy.MA);

 

MovingAverageType:

MAStudy.SIMPLE

MAStudy.EXPONENTIAL

MAStudy.WEIGHTED

MAStudy.VOLUMEWEIGHTED

 

Sample:  

/BuiltIn/builtinMA.efs

 

Note: it is possible to create an MA of an MA using the following syntax:

 

nStudy1 = new MAStudy( 10, 0, "Close", MAStudy.SIMPLE );
nStudy2 = new MAStudy( 20, 0, nStudy1, MAStudy.MA, MAStudy.SIMPLE );

 

In this example, nStudy2 is now a double-smoothed average (it is a 20-period average

of a 10-period average). You could then plot this new double-smooth average simply by

retrieving the value from the nStudy2 study:

 

nPlotVal = nStudy2.getValue( MAStudy.MA );
return( nPlotVal );