Class EnvelopesRTIndicator
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.averages.pro.EnvelopesRTIndicator
- All Implemented Interfaces:
Resettable, RTIndicator
Envelopes (Moving Average Envelopes) with O(1) per-tick computation.
Fixed-percentage bands above and below an EMA:
Middle = EMA(close, periods) Upper = Middle * (1 + percentage / 100) Lower = Middle * (1 - percentage / 100)
Simpler than Bollinger Bands (no volatility adjustment). Useful for identifying overbought/oversold conditions relative to the trend.
AbstractRTIndicator.getValue() returns the middle line (EMA).
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractRTIndicator
equals, getDisplayHint, getMeta, getValue, hashCode, hide, isPoison, setValue, toString, toString, withDisplayHint, withMeta
-
Constructor Details
-
EnvelopesRTIndicator
public EnvelopesRTIndicator() -
EnvelopesRTIndicator
public EnvelopesRTIndicator(int periods, double percentage)
-
-
Method Details
-
getUpper
public double getUpper() -
getLower
public double getLower() -
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
-