MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / getTimestamp

Function getTimestamp

examples/candlestick-streaming/main.ts:67–67  ·  view source on GitHub ↗
(p: OHLCDataPoint)

Source from the content-addressed store, hash-verified

65): p is readonly [timestamp: number, open: number, close: number, low: number, high: number] => Array.isArray(p);
66
67const getTimestamp = (p: OHLCDataPoint): number => (isTupleOHLCDataPoint(p) ? p[0] : p.timestamp);
68const getClose = (p: OHLCDataPoint): number => (isTupleOHLCDataPoint(p) ? p[2] : p.close);
69
70// Get appropriate dataZoom config based on candle count

Callers 4

initFunction · 0.70
handleTickFunction · 0.70
switchTimeframeFunction · 0.70
switchCandleCountFunction · 0.70

Calls 1

isTupleOHLCDataPointFunction · 0.70

Tested by

no test coverage detected