Class ConnorsRsiRTIndicator
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.momentum.pro.ConnorsRsiRTIndicator
- All Implemented Interfaces:
Resettable, RTIndicator
Connors RSI with O(1) per-tick computation (amortized).
CRSI = (RSI(close, rsiPeriod) + RSI(streak, streakRsiPeriod) + percentRank(roc, rankPeriod)) / 3
The streak counts consecutive up/down closes: up = +1,+2,+3..., down = -1,-2,-3...,
unchanged = 0. The percent rank measures what percentage of ROC values in the last
rankPeriod periods are less than or equal to the current ROC.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractRTIndicator
equals, getDisplayHint, getMeta, getValue, hashCode, hide, isPoison, setValue, toString, toString, withDisplayHint, withMeta
-
Constructor Details
-
ConnorsRsiRTIndicator
public ConnorsRsiRTIndicator() -
ConnorsRsiRTIndicator
public ConnorsRsiRTIndicator(int rsiPeriod, int streakRsiPeriod, int rankPeriod)
-
-
Method Details
-
getRsiPeriod
public int getRsiPeriod() -
getStreakRsiPeriod
public int getStreakRsiPeriod() -
getRankPeriod
public int getRankPeriod() -
isReady
public boolean isReady()Description copied from interface:RTIndicatorReturns whether this indicator has received enough data to produce meaningful values.During the warmup period,
RTIndicator.getValue()may return 0 or a partial estimate that should not be used for trading decisions. Once this method returnstrue, the indicator's output is statistically valid.The default implementation returns
truefor backward compatibility. Indicators with warmup requirements should override this method.For composite indicators (e.g. Bollinger Bands, MACD), readiness is determined by the slowest internal component.
- Returns:
trueif the indicator has completed its warmup period
-
reset
public void reset()- Specified by:
resetin interfaceResettable- Overrides:
resetin classAbstractRTIndicator
-
update
public double update(double newValue) - Specified by:
updatein interfaceRTIndicator- Overrides:
updatein classAbstractRTIndicator
-