A lightweight, framework-agnostic JavaScript/TypeScript library for calculating popular technical indicators like SMA, EMA, MACD, SuperTrend, Ichimoku Cloud, and more — usable in Node.js, React, Angular, Vue, and even VS Code extensions.
npm install @omdr/technical-indicators
import indicators from '@omdr/technical-indicators';
const sampleData = [
{ open: 100, high: 110, low: 90, close: 105, volume: 1000 },
{ open: 105, high: 115, low: 95, close: 110, volume: 1200 },
{ open: 110, high: 120, low: 100, close: 115, volume: 1300 },
// ... more OHLCV data
];
// Simple Moving Average
const sma6 = indicators.sma(6, sampleData);
// Exponential Moving Average
const ema9 = indicators.ema(9, sampleData);
// MACD
const macd = indicators.macd(sampleData, 12, 26, 9);
// SuperTrend
const supertrend = indicators.supertrend(sampleData, 10, 3);
- SMA (Simple Moving Average)
- EMA (Exponential Moving Average)
- MACD (Moving Average Convergence Divergence)
- SuperTrend (ATR-based)
- Parabolic SAR
- Ichimoku Cloud
- Vortex Indicator
- Trix
- KAMA (Kaufman’s Adaptive MA)
- Hull Moving Average
- Double EMA
- Triple EMA
- ZLEMA (Zero Lag EMA)
- VWMA (Volume Weighted MA)
- Tillson T3
More indicators coming soon!
- Node.js scripts
- Web apps (React, Angular, Vue, etc.)
- VS Code extensions
- Trading dashboards
- Custom strategy engines
If you find this useful, you can buy me a ☕:
Built with love by Offline Pixel
Follow me for more trading tech magic.
MIT — Free to use and extend, commercial or personal.