Live Demo: deepentropy.github.io/oakscriptJS
OakScriptJS is a TypeScript/JavaScript library that provides PineScript v6 compatible technical analysis functions. Build trading indicators, run backtests, or integrate TA calculations into any JavaScript environment.
| Package | Description |
|---|---|
| oakscriptjs | Technical analysis library with Series-based API |
| @oakscript/indicators | Pre-built technical indicators (SMA, EMA, RSI, MACD, BB, etc.) |
npm install oakscriptjsimport {Series, ta} from 'oakscriptjs';
const prices = [44, 44.5, 45, 45.5, 46, 46.5, 47, 47.5, 48, 48.5];
const close = new Series(prices);
const sma = ta.sma(close, 5);
console.log(sma.toArray());import { SMA, RSI, MACD } from '@oakscript/indicators';
const bars = [...]; // OHLCV data
const smaResult = SMA.calculate(bars, { len: 20 });
const rsiResult = RSI.calculate(bars, { length: 14 });- Guide — Getting started and core concepts
- Function Inventory — All available TA functions
- Official Examples — PineScript and JavaScript indicator examples
This is a pnpm workspace monorepo.
- Node.js >= 18.0.0
- pnpm >= 8.0.0
pnpm install # Install dependencies
pnpm build # Build all packages
pnpm test # Run tests
pnpm typecheck # Type checkpnpm --filter oakscriptjs build
pnpm --filter @oakscript/indicators testoakscriptJS/
├── packages/
│ ├── oakscriptjs/ # Technical analysis library
│ └── indicators/ # Pre-built indicators package
├── example/ # Live demo (GitHub Pages)
└── docs/ # Documentation + official examples
Maintained by DeepEntropy
