Class InstrumentMapFundingRateSourceRTIndicator
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.helpers.group.InstrumentMapRTIndicator
com.wualabs.qtsurfer.engine.indicators.helpers.group.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
-
Nested Class Summary
Nested classes/interfaces inherited from class InstrumentMapRTIndicator
InstrumentMapRTIndicator.IndicatorNotFoundException -
Field Summary
Fields inherited from class InstrumentMapRTIndicator
PRIVATE_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionInstrumentMapFundingRateSourceRTIndicator(@NonNull Instrument instrument, @NonNull FundingRateValueSource valueSource) InstrumentMapFundingRateSourceRTIndicator(Instrument instrument) -
Method Summary
Modifier and TypeMethodDescriptionbacktestEnabled(boolean backtestEnabled) protected StringWhich field of the incoming data this map extracts for scalar indicators, as a stable string.booleaninthashCode()booleanvoidsetBacktestEnabled(boolean backtestEnabled) voidupdateFrom(FundingRate source) Propagates a funding rate update to all registered indicators and to this map itself.Methods inherited from class InstrumentMapRTIndicator
add, clear, forEachPublicable, get, getCacheContext, getExisting, getInstrument, getNotices, getRaw, getReadOnly, getReadOnlyExisting, getValue, indicators, namedIndicators, raiseNotice, remove, reset, setClockSupplier, size, toStringMethods inherited from class AbstractRTIndicator
getDisplayHint, getMeta, getValue, hide, isPoison, setValue, toString, update, withDisplayHint, withMeta
-
Constructor Details
-
InstrumentMapFundingRateSourceRTIndicator
-
InstrumentMapFundingRateSourceRTIndicator
public InstrumentMapFundingRateSourceRTIndicator(@NonNull @NonNull Instrument instrument, @NonNull @NonNull FundingRateValueSource valueSource)
-
-
Method Details
-
backtestEnabled
-
cacheSelector
Description copied from class:InstrumentMapRTIndicatorWhich 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:
cacheSelectorin classInstrumentMapRTIndicator- Returns:
- the selector name, never null
-
updateFrom
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:
updateFromin interfaceRTIndicatorSource<FundingRate>- Parameters:
source- the funding rate data to propagate
-
hashCode
public int hashCode()- Overrides:
hashCodein classInstrumentMapRTIndicator
-
equals
- Overrides:
equalsin classInstrumentMapRTIndicator
-
getValueSource
-
isBacktestEnabled
public boolean isBacktestEnabled()- Specified by:
isBacktestEnabledin interfaceBacktestable
-
setBacktestEnabled
public void setBacktestEnabled(boolean backtestEnabled) - Specified by:
setBacktestEnabledin interfaceBacktestable
-