Class CciRTIndicator
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.core.AbstractWindowSeriesRTIndicator
com.wualabs.qtsurfer.engine.indicators.momentum.CciRTIndicator
- All Implemented Interfaces:
Resettable, RTIndicator
Commodity Channel Index (CCI) RTIndicator.
CCI measures the deviation of the price from its mean, normalized by the mean absolute deviation (MAD). Values above +100 suggest overbought conditions, below -100 suggest oversold conditions.
Formula: CCI = (price - SMA) / (0.015 × MAD)
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractWindowSeriesRTIndicator
getPeriods, isReady, onEvict, reset, window, windowSizeMethods inherited from class AbstractRTIndicator
equals, getDisplayHint, getMeta, getValue, hashCode, hide, isPoison, setValue, toString, toString, withDisplayHint, withMeta
-
Constructor Details
-
CciRTIndicator
public CciRTIndicator(int periods)
-
-
Method Details
-
onReset
protected void onReset()Description copied from class:AbstractWindowSeriesRTIndicatorCalled after window is cleared. Override to zero accumulators.- Overrides:
onResetin classAbstractWindowSeriesRTIndicator
-
update
public double update(double newValue) - Specified by:
updatein interfaceRTIndicator- Overrides:
updatein classAbstractRTIndicator
-