org.encog.app.quant.indicators
Class MovingAverage
java.lang.Object
org.encog.app.analyst.csv.basic.BaseCachedColumn
org.encog.app.quant.indicators.Indicator
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final String NAME
- The name of this indicator.
- See Also:
- Constant Field Values
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.
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.