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

Function getOpen

src/interaction/findCandlestick.ts:23–23  ·  view source on GitHub ↗
(p: OHLCDataPoint)

Source from the content-addressed store, hash-verified

21
22const getTimestamp = (p: OHLCDataPoint): number => (isTupleDataPoint(p) ? p[0] : p.timestamp);
23const getOpen = (p: OHLCDataPoint): number => (isTupleDataPoint(p) ? p[1] : p.open);
24const getClose = (p: OHLCDataPoint): number => (isTupleDataPoint(p) ? p[2] : p.close);
25
26const categoryStepCache = new WeakMap<ReadonlyArray<OHLCDataPoint>, number>();

Callers 1

isBodyHitAtFunction · 0.85

Calls 1

isTupleDataPointFunction · 0.70

Tested by

no test coverage detected