Class EaseOfMovementRTIndicator
- All Implemented Interfaces:
Resettable, CacheableRTIndicator, RichRTIndicator<MarketSnapshot>, RTIndicator
distanceMoved = ((high + low) / 2) - ((prevHigh + prevLow) / 2) boxRatio = (volume / 10000) / (high - low) EMV = distanceMoved / boxRatio EOM = SMA(EMV, period)
Relates price change to volume, showing how easily a price moves. High positive values indicate the price is advancing on low volume.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanisReady()Returns whether this indicator has received enough data to produce meaningful values.booleanWhether this indicator's result is only meaningful over per-bar OHLCV data.voidreset()This instance's math identity — equal signatures must mean identical value series for identical input.doubleupdate(double newValue) doubleupdateFrom(MarketSnapshot snap) Updates the indicator from a full market snapshot.doubleupdateHLV(double high, double low, double volume) Methods inherited from class AbstractRTIndicator
equals, getDisplayHint, getMeta, getValue, hashCode, hide, isPoison, setValue, toString, toString, withDisplayHint, withMetaMethods inherited from interface RTIndicator
getDisplayHint, getId, getMeta, getValue, isHidden, ro, update, update
-
Constructor Details
-
EaseOfMovementRTIndicator
public EaseOfMovementRTIndicator() -
EaseOfMovementRTIndicator
public EaseOfMovementRTIndicator(int periods)
-
-
Method Details
-
getPeriods
public int getPeriods() -
signature
Description copied from interface:CacheableRTIndicatorThis instance's math identity — equal signatures must mean identical value series for identical input.- Specified by:
signaturein interfaceCacheableRTIndicator- Returns:
- the identity, or
nullwhen this instance cannot state one (an unidentifiable source, a mode the implementation does not model) and must therefore compute live
-
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.
- Specified by:
isReadyin interfaceRTIndicator- Returns:
trueif the indicator has completed its warmup period
-
reset
public void reset()- Specified by:
resetin interfaceResettable- Overrides:
resetin classAbstractRTIndicator
-
requiresBarData
public boolean requiresBarData()Whether this indicator's result is only meaningful over per-bar OHLCV data.The distinction matters because a
RichRTIndicator<MarketSnapshot>accepts aTickerSnapshotjust as happily as aKlineSnapshot— and on the ticker pathvolume,high,lowandopenare the exchange's 24-hour rolling statistics, not this tick's bar. Nothing throws: OBV silently accumulates a 24h volume figure over and over, ATR reads a 24h range as if it were one bar's. The numbers look plausible and mean nothing, which is the worst failure mode of the three.Indicators that return
trueare flagged once per (indicator, instrument) when bound on the ticker path — seeInstrumentMapTickerSourceRTIndicator. Scalar indicators (SMA/EMA/RSI over a single price) are unaffected and default tofalse.true: this indicator reads per-bar OHLCV, which the ticker path does not carry.- Specified by:
requiresBarDatain interfaceRichRTIndicator<MarketSnapshot>- Returns:
trueif this indicator needs real bar data;falseby default
-
updateFrom
Description copied from interface:RichRTIndicatorUpdates the indicator from a full market snapshot. Returns the new value so callers can chain (matchingRTIndicator.update(double)'s contract).- Specified by:
updateFromin interfaceRichRTIndicator<MarketSnapshot>
-
updateHLV
public double updateHLV(double high, double low, double volume) -
update
public double update(double newValue) - Specified by:
updatein interfaceRTIndicator- Overrides:
updatein classAbstractRTIndicator
-