Class ExponentialMovingAverage
java.lang.Object
trade.invision.indicators.indicators.Indicator<Num>
trade.invision.indicators.indicators.CachingIndicator<Num>
trade.invision.indicators.indicators.RecursiveIndicator<Num>
trade.invision.indicators.indicators.ma.ema.ExponentialMovingAverage
ExponentialMovingAverage is a Num Indicator to provide an Exponential Moving Average (EMA)
over a length 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
ConstructorsModifierConstructorDescriptionprotectedExponentialMovingAverage(Indicator<Num> indicator, int length, Num smoothing) -
Method Summary
Modifier and TypeMethodDescriptionprotected Numcalculate(long index) Performs the calculation of thisIndicatorat the givenindex.static ExponentialMovingAveragestatic ExponentialMovingAveragestatic ExponentialMovingAverageexponentialMovingAverage(Indicator<Num> indicator, int length) static ExponentialMovingAverageexponentialMovingAverage(Indicator<Num> indicator, int length, Num smoothing) Gets aExponentialMovingAverage.Methods inherited from class trade.invision.indicators.indicators.RecursiveIndicator
getValueMethods inherited from class trade.invision.indicators.indicators.Indicator
caching, getMinimumStableIndex, getSeries, 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
-
ExponentialMovingAverage
-
-
Method Details
-
ema
- See Also:
-
exponentialMovingAverage
public static ExponentialMovingAverage exponentialMovingAverage(Indicator<Num> indicator, int length) -
ema
- See Also:
-
exponentialMovingAverage
public static ExponentialMovingAverage exponentialMovingAverage(Indicator<Num> indicator, int length, Num smoothing) Gets aExponentialMovingAverage.- Parameters:
indicator- theIndicatorlength- the number of values to look back atsmoothing- the smoothing factor (typically 2)
-
calculate
Description copied from class:IndicatorPerforms the calculation of thisIndicatorat the givenindex.
-