How luxalgo/pinets works
PineTS is a TypeScript Pine Script runtime. The documented workflow is to provide Pine Script (or PineTS-style code) and OHLCV data, run it through the transpiler and bar-by-bar runtime, then consume plot series; providers and streaming support extend that workflow. The graph reflects README claims and the supplied source index/excerpts. Several API families are represented by their directory paths because their implementation details were not sampled.
Main entry points: PineTS.class.ts PineTS engine · Context.class.ts Execution context · index.ts Transpiler orchestration · Indicator.class.ts Indicator preparation
Components 22
Inputs and market data
- Market providers
src/marketData - Provider aggregation
src/marketData/BaseProvider.ts - Candle aggregation
src/marketData/aggregation.ts - Timeframe rules
src/timeframe.ts
Pine compilation
- Indicator preparation
src/Indicator/Indicator.class.ts - Input declarations
src/Indicator/scanInputs.ts - Transpiler orchestration
src/transpiler/index.ts - Pine parser and codegen
src/transpiler/pineToJS - Scope and analysis
src/transpiler/analysis - AST transformations
src/transpiler/transformers
Execution runtime
- PineTS engine
src/PineTS.class.ts - Execution context
src/Context.class.ts - Time series
src/Series.ts - Live bar updates
src/PineTS.class.ts
Pine API and outputs
- Technical analysis
src/namespaces/ta - Cross-series requests
src/namespaces/request - Strategy simulation
src/namespaces/strategy - Pine data structures
src/namespaces/array - Chart and drawing APIs
src/namespaces/Plots.ts - Plot series
Other components
- Script author
- OHLCV data
Connections 21
- Script author → PineTS engine: runs script
- OHLCV data → PineTS engine: provides bars
- PineTS engine → Market providers: uses providers
src/PineTS.class.ts - PineTS engine → Execution context: initializes context
src/PineTS.class.ts - PineTS engine → Indicator preparation: prepares indicator
src/PineTS.class.ts - Indicator preparation → Transpiler orchestration: transpiles source
src/Indicator/Indicator.class.ts - Indicator preparation → Input declarations: scans inputs
src/Indicator/Indicator.class.ts - Transpiler orchestration → Pine parser and codegen: parses source
src/transpiler/index.ts - Transpiler orchestration → Scope and analysis: runs analysis
src/transpiler/index.ts - Transpiler orchestration → AST transformations: transforms AST
src/transpiler/index.ts - Execution context → Time series: uses series
src/Context.class.ts - Provider aggregation → Candle aggregation: aggregates candles
src/marketData/BaseProvider.ts - Provider aggregation → Timeframe rules: normalizes intervals
src/marketData/BaseProvider.ts - PineTS engine → Timeframe rules: parses intervals
src/PineTS.class.ts - Execution context → Technical analysis: exposes namespace
src/Context.class.ts - Execution context → Cross-series requests: exposes namespace
src/Context.class.ts - Execution context → Strategy simulation: exposes namespace
src/Context.class.ts - Execution context → Pine data structures: exposes namespace
src/Context.class.ts - Execution context → Chart and drawing APIs: exposes plot API
src/Context.class.ts - PineTS engine → Plot series: returns plot series
- PineTS engine → Live bar updates: streams updates
src/PineTS.class.ts