PineTS is an open-source transpiler and runtime that executes Pine Script (TradingView's indicator language) in Node.js, browsers, and other JavaScript runtimes. Version 0.9.13 is the latest stable release, with active development and biweekly releases. Key differentiators include 1:1 syntax compatibility with Pine Script v5, support for multiple data providers (Binance, CSV, custom), and full TypeScript types. Unlike alternatives (e.g., pine-js), PineTS is a full runtime with a built-in transpiler and provider abstraction, enabling off-platform execution of indicators and strategies for backtesting, alerts, and ML pipelines.
npm install pinetsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes PineTS with Binance BTCUSDT 1h data and runs a simple EMA cross Pine Script, logging the first 5 values of each plot.
Replace provider strings with enum values: Provider.Binance, Provider.BinanceFutures, etc.
Access plots via plots['name'] instead of destructuring from array.
Switch to ES module imports: import { PineTS } from 'pinets'.Use backticks for multi-line Pine code to avoid escaping issues.
Request extra bars (e.g., 200) to account for missing data or warmup.
Filter out NaN values or slice after warmup period (e.g., plots['SMA 20'].data.slice(20)).
Run 'npm install pinets' and ensure you're using ESM imports.
Use 'import { Provider } from 'pinets'' and access Provider.Binance.Switch to ES module syntax or add 'type': 'module' in package.json.
Check Pine Script code for errors and ensure version pragma is included.