Class InstrumentMapKlineSourceRTIndicator

All Implemented Interfaces:
Backtestable, ClockAware, Resettable, RTIndicator, RTIndicatorSource<Kline>

public class InstrumentMapKlineSourceRTIndicator extends InstrumentMapRTIndicator implements RTIndicatorSource<Kline>
A map of RTIndicators for an instrument fed from a kline stream — the kline-side counterpart of InstrumentMapTickerSourceRTIndicator. Builds a KlineSnapshot once per bar and dispatches it to every registered indicator.

RichRTIndicator indicators must be bound to KlineSnapshot or to the MarketSnapshot supertype — which covers every shipped indicator: the OHLCV pro indicators and the scalar wrapper (TickerRTIndicator) are all MarketSnapshot-bound. A hand-written RichRTIndicator<TickerSnapshot> would throw ClassCastException here (klines carry no order-book data), but none ship. The scalar fallback uses a KlineValueSource via KlineSnapshots; a NumberOfTrades source on a non-kline snapshot resolves to Double.NaN and is skipped.

  • Constructor Details

    • InstrumentMapKlineSourceRTIndicator

      public InstrumentMapKlineSourceRTIndicator(Instrument instrument)
    • InstrumentMapKlineSourceRTIndicator

      public InstrumentMapKlineSourceRTIndicator(@NonNull @NonNull Instrument instrument, @NonNull @NonNull KlineValueSource valueSource)
  • Method Details