Class MovingAverageConvergenceDivergence
java.lang.Object
trade.invision.indicators.indicators.Indicator<Num>
trade.invision.indicators.indicators.macd.MovingAverageConvergenceDivergence
- Direct Known Subclasses:
AwesomeOscillator
MovingAverageConvergenceDivergence is a Num Indicator to provide the Moving Average
Convergence/Divergence (MACD) over a shortLength and longLength of values.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class trade.invision.indicators.indicators.Indicator
Indicator.CacheSeries -
Field Summary
Fields inherited from class trade.invision.indicators.indicators.Indicator
cachedAddCallCount, cachedIndex, cachedValue, cacheSeries, minimumStableIndex, series -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMovingAverageConvergenceDivergence(Indicator<Num> indicator, int shortLength, int longLength, MovingAverageSupplier movingAverageSupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected Numcalculate(long index) Performs the calculation of thisIndicatorat the givenindex.macd(Indicator<Num> indicator, int shortLength, int longLength, MovingAverageSupplier movingAverageSupplier) movingAverageConvergenceDivergence(Indicator<Num> indicator, int shortLength, int longLength, MovingAverageSupplier movingAverageSupplier) Methods inherited from class trade.invision.indicators.indicators.Indicator
caching, getMinimumStableIndex, getSeries, getValue, isCaching, numOf, numOf, numOf, numOf, numOfEight, numOfFive, numOfFour, numOfHalf, numOfHundred, numOfHundredth, numOfNegativeOne, numOfNine, numOfOne, numOfSeven, numOfSix, numOfTen, numOfTenth, numOfThousand, numOfThousandth, numOfThree, numOfTwo, numOfZero, purgeCache
-
Constructor Details
-
MovingAverageConvergenceDivergence
protected MovingAverageConvergenceDivergence(Indicator<Num> indicator, int shortLength, int longLength, MovingAverageSupplier movingAverageSupplier)
-
-
Method Details
-
macd
public static MovingAverageConvergenceDivergence macd(Indicator<Num> indicator, int shortLength, int longLength, MovingAverageSupplier movingAverageSupplier) - See Also:
-
movingAverageConvergenceDivergence
public static MovingAverageConvergenceDivergence movingAverageConvergenceDivergence(Indicator<Num> indicator, int shortLength, int longLength, MovingAverageSupplier movingAverageSupplier) - Parameters:
indicator- theIndicatorshortLength- the short averaging length (typically 12)longLength- the long averaging length (typically 26)movingAverageSupplier- theMovingAverageSupplier
-
calculate
Description copied from class:IndicatorPerforms the calculation of thisIndicatorat the givenindex.
-