Class TickerSnapshots
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.helpers.TickerSnapshots
Scalar-update helpers for a
TickerValueSource against a MarketSnapshot. Extracts a
single field and feeds it into a scalar RTIndicator.
Common OHLCV fields read the MarketSnapshot accessors directly (valid on both ticker
and kline). Ticker-only fields (bid/ask/vwap/percentChange) are present only on a
TickerSnapshot; on any other snapshot they resolve 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, TickerValueSource tickerValueSource) Reads a single primitive double from the snapshot via the source selector.static voidupdate(RTIndicator indicator, MarketSnapshot snap, TickerValueSource tickerValueSource) Extracts the field selected bytickerValueSourcefrom the snapshot and pushes it into the indicator.
-
Method Details
-
update
public static void update(RTIndicator indicator, MarketSnapshot snap, TickerValueSource tickerValueSource) Extracts the field selected bytickerValueSourcefrom the snapshot and pushes it into the indicator. Skips when the field is non-finite (Double.NaNor ±Infinity): a missing ticker-only field resolves to NaN by design, 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.
-