Class ComplexConvergenceDivergence
java.lang.Object
trade.invision.indicators.indicators.Indicator<Boolean>
trade.invision.indicators.indicators.convergencedivergence.ComplexConvergenceDivergence
ComplexConvergenceDivergence is a Boolean Indicator to test whether two Num
Indicators converge or diverge over a length of values. "Complex" convergence-divergence uses an
advanced evaluation technique that tests if the correlation (using the correlation coefficient) and the slope (using
the linear regression model) of values in a timeframe that align with the given convergence-divergence
type are above the given thresholds. This requires more computational power than the "simple"
convergence-divergence technique. Internally, this uses the CorrelationCoefficient and the
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
ConstructorsModifierConstructorDescriptionprotectedComplexConvergenceDivergence(Indicator<Num> first, Indicator<Num> second, ConvergenceDivergenceType type, int length, Num correlationThreshold, Num slopeThreshold, boolean unbiased) -
Method Summary
Modifier and TypeMethodDescriptionprotected Booleancalculate(long index) Performs the calculation of thisIndicatorat the givenindex.static ComplexConvergenceDivergencecomplexConvergenceDivergence(Indicator<Num> first, Indicator<Num> second, ConvergenceDivergenceType type, int length, Num correlationThreshold, Num slopeThreshold, boolean unbiased) Gets aComplexConvergenceDivergence.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
-
ComplexConvergenceDivergence
-
-
Method Details
-
complexConvergenceDivergence
public static ComplexConvergenceDivergence complexConvergenceDivergence(Indicator<Num> first, Indicator<Num> second, ConvergenceDivergenceType type, int length, Num correlationThreshold, Num slopeThreshold, boolean unbiased) Gets aComplexConvergenceDivergence.- Parameters:
first- the firstIndicatorsecond- the secondIndicatortype- theConvergenceDivergenceTypelength- the number of values to look back atcorrelationThreshold- the correlation threshold. Must be between zero and one. Zero to disable.slopeThreshold- the slope threshold. Must be between zero and one. Zero to disable.unbiased-trueto usen - 1(unbiased) for the divisor in the correlation coefficient calculation,falseto usen(biased)
-
calculate
Description copied from class:IndicatorPerforms the calculation of thisIndicatorat the givenindex.
-