org.encog.app.quant.indicators
Class MovingAverage

java.lang.Object
  extended by org.encog.app.analyst.csv.basic.BaseCachedColumn
      extended by org.encog.app.quant.indicators.Indicator
          extended by org.encog.app.quant.indicators.MovingAverage

public class MovingAverage
extends Indicator

A simple moving average.


Field Summary
static String NAME
          The name of this indicator.
 
Constructor Summary
MovingAverage(int thePeriods, boolean output)
          Construct this object.
 
Method Summary
 void calculate(Map<String,BaseCachedColumn> data, int length)
          Calculate this indicator.
 int getPeriods()
           
 
Methods inherited from class org.encog.app.quant.indicators.Indicator
getBeginningIndex, getEndingIndex, require, setBeginningIndex, setEndingIndex
 
Methods inherited from class org.encog.app.analyst.csv.basic.BaseCachedColumn
allocate, getData, getName, isIgnore, isInput, isOutput, setIgnore, setInput, setName, setOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
The name of this indicator.

See Also:
Constant Field Values
Constructor Detail

MovingAverage

public MovingAverage(int thePeriods,
                     boolean output)
Construct this object.

Parameters:
thePeriods - The number of periods in this indicator.
output - True, if this indicator is predicted.
Method Detail

calculate

public final void calculate(Map<String,BaseCachedColumn> data,
                            int length)
Calculate this indicator.

Specified by:
calculate in class Indicator
Parameters:
data - The data to use.
length - The length to calculate over.

getPeriods

public final int getPeriods()
Specified by:
getPeriods in class Indicator
Returns:
The number of periods in this indicator.


Copyright © 2014. All Rights Reserved.