Interface RichRTIndicator<T extends MarketSnapshot>
- Type Parameters:
T- snapshot shape this indicator consumes (TickerSnapshot or KlineSnapshot)
- All Superinterfaces:
Resettable, RTIndicator
- All Known Implementing Classes:
AcceleratorOscillatorRTIndicator, AdlRTIndicator, AdxRTIndicator, AroonRTIndicator, AtrRTIndicator, AwesomeOscillatorRTIndicator, BalanceOfPowerRTIndicator, BullBearPowerRTIndicator, ChaikinOscillatorRTIndicator, ChandeKrollStopRTIndicator, ChandelierExitRTIndicator, ChoppinessIndexRTIndicator, CmfRTIndicator, CompoundTickerRTIndicator, DonchianChannelRTIndicator, EaseOfMovementRTIndicator, ElderForceIndexRTIndicator, IchimokuRTIndicator, KeltnerChannelRTIndicator, KlingerOscillatorRTIndicator, MassIndexRTIndicator, MfiRTIndicator, NatrRTIndicator, NegativeVolumeIndexRTIndicator, ObvRTIndicator, ParabolicSarRTIndicator, PvtRTIndicator, RelativeVigorIndexRTIndicator, StochasticOscillatorRTIndicator, SuperTrendRTIndicator, TickerRTIndicator, UltimateOscillatorRTIndicator, VortexRTIndicator, VwapRTIndicator, WilliamsRRTIndicator
MarketSnapshot rather than a single scalar
value. Use this when the indicator needs more than one field from the input — e.g. ATR (HLC),
OBV (volume + close), VWAP (volume + price), microstructure indicators (bid/ask).
Scalar indicators (SMA, EMA, RSI, …) continue to extend RTIndicator and receive a
single double via TickerValueSource-driven field extraction; nothing changes for them.
The wiring layer (InstrumentMapTickerSourceRTIndicator) builds the snapshot once per
tick and dispatches it to every registered indicator that implements this interface, while
scalar indicators receive the extracted field. Compile-time type-safety: the dispatcher pattern
matches the snapshot type via the sealed MarketSnapshot hierarchy.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether this indicator's result is only meaningful over per-bar OHLCV data.doubleupdateFrom(T snapshot) Updates the indicator from a full market snapshot.Methods inherited from interface Resettable
reset
-
Method Details
-
updateFrom
Updates the indicator from a full market snapshot. Returns the new value so callers can chain (matchingRTIndicator.update(double)'s contract). -
requiresBarData
default 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.- Returns:
trueif this indicator needs real bar data;falseby default
-