org.encog.app.quant.indicators

## Class Indicator

- java.lang.Object
- - org.encog.app.analyst.csv.basic.BaseCachedColumn
  - - org.encog.app.quant.indicators.Indicator

- Direct Known Subclasses:
    BestClose, BestReturn, MovingAverage

      public abstract class Indicator
      extends BaseCachedColumn

  An indicator, used by Encog.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Indicator(String name, boolean input, boolean output)` Construct the indicator.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `calculate(Map<String,BaseCachedColumn> data, int length)` Calculate this indicator.
    `int` | `getBeginningIndex()`
    `int` | `getEndingIndex()`
    `abstract int` | `getPeriods()`
    `void` | `require(Map<String,BaseCachedColumn> theData, String item)` Require a specific type of underlying data.
    `void` | `setBeginningIndex(int theBeginningIndex)`
    `void` | `setEndingIndex(int theEndingIndex)`

    - ### 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`

- - ### Constructor Detail

    - #### Indicator

          public Indicator(String name,
                   boolean input,
                   boolean output)

      Construct the indicator.
      Parameters:
        `name` - The indicator name.
        `input` - Is this indicator used to predict?
        `output` - Is this indicator what we are trying to predict.

  - ### Method Detail

    - #### calculate

          public abstract void calculate(Map<String,BaseCachedColumn> data,
                       int length)

      Calculate this indicator.
      Parameters:
        `data` - The data available to this indicator.
        `length` - The length of data to use.

    - #### getBeginningIndex

          public final int getBeginningIndex()

      Returns:
        the beginningIndex

    - #### getEndingIndex

          public final int getEndingIndex()

      Returns:
        the endingIndex

    - #### getPeriods

          public abstract int getPeriods()

      Returns:
        The number of periods this indicator is for.

    - #### require

          public final void require(Map<String,BaseCachedColumn> theData,
                     String item)

      Require a specific type of underlying data.
      Parameters:
        `theData` - The data available.
        `item` - The type of data we are looking for.

    - #### setBeginningIndex

          public final void setBeginningIndex(int theBeginningIndex)

      Parameters:
        `theBeginningIndex` - the beginningIndex to set

    - #### setEndingIndex

          public final void setEndingIndex(int theEndingIndex)

      Parameters:
        `theEndingIndex` - the endingIndex to set.

Copyright © 2014. All Rights Reserved.