Class KlineSnapshots
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.helpers.KlineSnapshots
Scalar-update helpers for a
KlineValueSource against a MarketSnapshot, mirroring
TickerSnapshots for the kline path. Extracts a single field and feeds it into a scalar
RTIndicator.
OHLCV fields read the MarketSnapshot accessors directly. NumberOfTrades is
kline-only: on any non-KlineSnapshot it resolves to Double.NaN and the update is
skipped. Extraction is a switch (tableswitch) — no virtual dispatch on the hot path.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetValue(MarketSnapshot snap, KlineValueSource klineValueSource) Reads a single primitive double from the snapshot via the source selector.static voidupdate(RTIndicator indicator, MarketSnapshot snap, KlineValueSource klineValueSource) Extracts the field selected byklineValueSourcefrom the snapshot and pushes it into the indicator.
-
Method Details
-
update
public static void update(RTIndicator indicator, MarketSnapshot snap, KlineValueSource klineValueSource) Extracts the field selected byklineValueSourcefrom the snapshot and pushes it into the indicator. Skips when the field is non-finite (Double.NaNor ±Infinity): a kline-only field on a non-kline snapshot resolves to NaN, and a corrupt feed value may be ±Infinity — neither must reach a rolling accumulator, where a single non-finite tick poisons it permanently. -
getValue
Reads a single primitive double from the snapshot via the source selector.
-