Class LeastSquaresMovingAverage
java.lang.Object
trade.invision.indicators.indicators.Indicator<Num>
trade.invision.indicators.indicators.ma.lsma.LeastSquaresMovingAverage
LeastSquaresMovingAverage is a Num Indicator to provide a Least Squares Moving Average (LSMA)
over a length of values. Also known as the Time Series Moving Average (TSMA). This Indicator
yields LinearRegressionResultType.Y from LinearRegression.- 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
ConstructorsModifierConstructorDescriptionprotectedLeastSquaresMovingAverage(Indicator<Num> indicator, int length) -
Method Summary
Modifier and TypeMethodDescriptionprotected Numcalculate(long index) Performs the calculation of thisIndicatorat the givenindex.static LeastSquaresMovingAverageleastSquaresMovingAverage(Indicator<Num> indicator, int length) Gets aLeastSquaresMovingAverage.static LeastSquaresMovingAverageMethods 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
-
LeastSquaresMovingAverage
-
-
Method Details
-
lsma
- See Also:
-
leastSquaresMovingAverage
public static LeastSquaresMovingAverage leastSquaresMovingAverage(Indicator<Num> indicator, int length) Gets aLeastSquaresMovingAverage.- Parameters:
indicator- theIndicatorlength- the number of values to look back at
-
calculate
Description copied from class:IndicatorPerforms the calculation of thisIndicatorat the givenindex.
-