Class InstrumentMapFundingRateSourceRTIndicator

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

public class InstrumentMapFundingRateSourceRTIndicator extends InstrumentMapRTIndicator implements FundingRateRTIndicatorSource
A map of RTIndicators for an instrument
  • Constructor Details

    • InstrumentMapFundingRateSourceRTIndicator

      public InstrumentMapFundingRateSourceRTIndicator(Instrument instrument)
    • InstrumentMapFundingRateSourceRTIndicator

      public InstrumentMapFundingRateSourceRTIndicator(@NonNull @NonNull Instrument instrument, @NonNull @NonNull FundingRateValueSource valueSource)
  • Method Details

    • backtestEnabled

      public InstrumentMapFundingRateSourceRTIndicator backtestEnabled(boolean backtestEnabled)
    • cacheSelector

      protected String cacheSelector()
      Description copied from class: InstrumentMapRTIndicator
      Which field of the incoming data this map extracts for scalar indicators, as a stable string.

      Abstract rather than defaulted on purpose: a subclass that reads a different field and forgot to say so would share memoized series between streams that never produced the same numbers, and a compile error is a far better way to find that out than a wrong leaderboard.

      Specified by:
      cacheSelector in class InstrumentMapRTIndicator
      Returns:
      the selector name, never null
    • updateFrom

      public void updateFrom(FundingRate source)
      Propagates a funding rate update to all registered indicators and to this map itself. In backtest mode, the funding rate's timestamp is used to set a fixed clock on all clock-aware indicators before the update. Each child indicator is updated via its own source interface if it implements FundingRateRTIndicatorSource, or via the configured value source otherwise.
      Specified by:
      updateFrom in interface RTIndicatorSource<FundingRate>
      Parameters:
      source - the funding rate data to propagate
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class InstrumentMapRTIndicator
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class InstrumentMapRTIndicator
    • getValueSource

      public FundingRateValueSource getValueSource()
    • isBacktestEnabled

      public boolean isBacktestEnabled()
      Specified by:
      isBacktestEnabled in interface Backtestable
    • setBacktestEnabled

      public void setBacktestEnabled(boolean backtestEnabled)
      Specified by:
      setBacktestEnabled in interface Backtestable