← All packages

@lacspace/indicators

v1.1.3StockKit0 deps

Streaming technical indicators (RSI, MACD, EMA, Bollinger, ATR, Supertrend, ADX, VWAP) with O(1) incremental updates for live price feeds. Zero-dependency.

npm i @lacspace/indicators

Usage

indicators.ts
import { RSI, MACD } from "@lacspace/indicators";

const rsi = new RSI(14);
const macd = new MACD(12, 26, 9);

// wire straight into your tick feed
socket.on("ltp", (price) => {
  const r = rsi.next(price);       // O(1) — no array recompute
  const m = macd.next(price);
  if (r !== null && r > 70) console.log("overbought", r.toFixed(1));
  if (m) console.log("histogram", m.histogram.toFixed(2));
});

Exports 24

ADXATRBollingerBandsCandleAggregatorEMAMACDRSISMAStochasticSupertrendVWAPWMAadxatrbollingercrossedAbovecrossedBelowdetectPatternsemamacdrsismasupertrendwma

Keywords

technical-indicatorstradingstock-marketrsimacdema

More in StockKit