npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dwlf/indicators

v1.1.0

Published

Zero-dependency technical indicators for Node, browsers, and workers. Pure math — candles in, values out.

Readme

@dwlf/indicators

Zero-dependency technical indicators for Node.js, browsers, and workers.

Pure math — candles in, values out. No market data, no side effects, no runtime dependencies.

Install

npm install @dwlf/indicators
# or
pnpm add @dwlf/indicators

Quick Start

import { DSS, Bollinger, EMA, SupportResistance } from '@dwlf/indicators';
import type { Candle } from '@dwlf/indicators';

const candles: Candle[] = [
  { t: 1700000000, o: 100, h: 105, l: 98, c: 103, v: 1000 },
  // ...
];

// Compute indicators — all functions take (candles, optionalParams)
const ema8 = EMA.computeEMA(candles, { length: 8 });
const dss = DSS.computeDSS(candles, { length: 10, smooth1: 9, signal: 5 });
const bb = Bollinger.computeBollingerBands(candles, { length: 20, standardDeviation: 2 });

// Detect events
const dssEvents = DSS.detectEvents(candles);
const emaEvents = EMA.detectEvents(candles, { length: 8 });

Indicators

| Module | Description | |--------|-------------| | DSS | Double Smoothed Stochastic (Bressert) | | DSSState | Streaming DSS state tracking | | Bollinger | Bollinger Bands (upper, middle, lower, %B, bandwidth) | | EMA | Exponential Moving Average with event detection | | SMA | Simple Moving Average with event detection | | EMACloud | EMA cloud/ribbon (alignment, cloud hit) | | Swing | Swing high/low detection | | SwingBreak | Swing break detection | | SwingSweep | Liquidity sweep detection | | Fib | Fibonacci retracement levels | | SupportResistance | Support/resistance level calculation | | SupportResistanceTracker | S/R tracking over time | | Trendline | Trendline detection | | BreachDetection | Trendline breach detection |

Math Utilities

Low-level building blocks, also exported:

import { ema, sma, rollingHighest, rollingLowest, standardDeviation } from '@dwlf/indicators';

API Pattern

Every indicator follows the same pattern:

// Compute raw values
const result = Module.computeX(candles, params?);

// Detect events (crossovers, threshold breaches, etc.)
const events = Module.detectEvents(candles, params?);

// Get event metadata (what events this indicator can emit)
const definitions = Module.getEventDefinitions();

BYOC: Bring Your Own Candles

This library is intentionally data-source agnostic. Provide candles in the standard OHLCV format:

type Candle = {
  t: number;  // timestamp (unix seconds or ms)
  o: number;  // open
  h: number;  // high
  l: number;  // low
  c: number;  // close
  v?: number; // volume (optional)
};

Used By

This is the same indicator math that powers DWLF — a market intelligence platform for traders. The event detection, strategy engine, and cycle analysis that sit on top of these indicators are available via the DWLF platform.

License

MIT