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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ixjb94/indicators-js

v1.0.0

Published

Fastest Technical Indicators written in javascript. More than +100 indicators(SMA, EMA, RSI, MACD, ...)

Downloads

98

Readme

About

Fastest Technical Indicators written in JavaScript

  • Zero Dependencies
  • No Internal Function Calls
  • Lightweight: +100 Indicators only ~30kb

Supports

Browser, ES6, CommonJS, NodeJS, Bun, Svelte, React, Angular, etc.

Installation

npm install @ixjb94/indicators-js

Examples

NodeJS, Bun, React, Svelte, Angular, etc.

import { ema } from "@ixjb94/indicators-js"
// or
const { ema } = require("@ixjb94/indicators-js")

const source = [1,2,3,4,5]
const result = ema(source, 3)

Browser - Option 1

<script src="./node_modules/@ixjb94/indicators-js/dist/index.umd.js"></script>
<script>
    const { ema } = window.indicators
    const result = ema([1,2,3,4,5], 3)
    console.log(result)
</script>

Browser - Option 2 - use the Indicators you need

<script src="./node_modules/@ixjb94/indicators-js/core/ema.js"></script>
<script src="./node_modules/@ixjb94/indicators-js/core/rsi.js"></script>
<!-- etc -->
<script>
    const myEMA = ema([1,2,3,4,5], 3)
    const myRSI = rsi([1,2,3,4,5,6], 4)
    console.log(myEMA)
    console.log(myRSI)
</script>

Browser - Option 3 - Using CDN

<!-- All 30kb file -->
<script src="https://unpkg.com/@ixjb94/indicators-js@latest/dist/index.umd.js"></script>

<!-- Singles -->
<script src="https://unpkg.com/@ixjb94/indicators-js@latest/core/ema.js"></script>
<script src="https://unpkg.com/@ixjb94/indicators-js@latest/core/rsi.js"></script>

Vite Vanilla: same as Svelte, React, etc.

Indicators

✅ = Available and fastest
❌ = Indicator is not available
🔄 = Developing...
Compared to:
node-talib, tulipnode, technicalindicators, pandas_ta

| Identifier | Indicator Name | @ixjb94/indicators-js | | --------------- | ------------------------------------- | ------------------ | | ad | Accumulation/Distribution Line | ✅ | | adosc | Accumulation/Distribution Oscillator | ✅ | | adx | Average Directional Movement Index | ✅ | | adxr | Average Directional Movement Rating | ✅ | | ao | Awesome Oscillator | ✅ | | apo | Absolute Price Oscillator | ✅ | | aroon | Aroon | ✅ | | aroonosc | Aroon Oscillator | ✅ | | atr | Average True Range | ✅ | | avgprice | Average Price | ✅ | | bbands | Bollinger Bands | ✅ | | bop | Balance of Power | ✅ | | cci | Commodity Channel Index | ✅ | | cmo | Chande Momentum Oscillator | ✅ | | crossany | Crossany | ✅ | | crossover | Crossover | ✅ | | crossunder | Crossunder | ✅ | | crossOverNumber | Crossover a number | ✅ | | crossUnderNumber| Crossunder a number | ✅ | | cvi | Chaikins Volatility | ✅ | | decay | Linear Decay | ✅ | | dema | Double Exponential Moving Average | ✅ | | di | Directional Indicator | ✅ | | dm | Directional Movement | ✅ | | dpo | Detrended Price Oscillator | ✅ | | dx | Directional Movement Index | ✅ | | edecay | Exponential Decay | ✅ | | ema | Exponential Moving Average | ✅ | | emv | Ease of Movement | ✅ | | fisher | Fisher Transform | ✅ | | fosc | Forecast Oscillator | ✅ | | hma | Hull Moving Average | ✅ | | kama | Kaufman Adaptive Moving Average | ✅ | | kvo | Klinger Volume Oscillator | ✅ | | lag | Lag | ✅ | | linreg | Linear Regression | ✅ | | linregintercept | Linear Regression Intercept | ✅ | | linregslope | Linear Regression Slope | ✅ | | macd | Moving Average Convergence/Divergence | ✅ | | marketfi | Market Facilitation Index | ✅ | | mass | Mass Index | ✅ | | max | Maximum In Period | ✅ | | md | Mean Deviation Over Period | ✅ | | medprice | Median Price | ✅ | | mfi | Money Flow Index | ✅ | | min | Minimum In Period | ✅ | | mom | Momentum | ✅ | | natr | Normalized Average True Range | ✅ | | nvi | Negative Volume Index | ✅ | | obv | On Balance Volume | ✅ | | ppo | Percentage Price Oscillator | ✅ | | psar | Parabolic SAR | ✅ | | pvi | Positive Volume Index | ✅ | | qstick | Qstick | ✅ | | roc | Rate of Change | ✅ | | rocr | Rate of Change Ratio | ✅ | | rsi | Relative Strength Index | ✅ | | sma | Simple Moving Average | ✅ | | stddev | Standard Deviation Over Period | ✅ | | stderr | Standard Error Over Period | ✅ | | stoch | Stochastic Oscillator | ✅ | | stochrsi | Stochastic RSI | ✅ | | sum | Sum Over Period | ✅ | | tema | Triple Exponential Moving Average | ✅ | | tr | True Range | ✅ | | trima | Triangular Moving Average | ✅ | | trix | Trix | ✅ | | tsf | Time Series Forecast | ✅ | | typprice | Typical Price | ✅ | | ultosc | Ultimate Oscillator | ✅ | | var | Variance Over Period | ✅ | | vhf | Vertical Horizontal Filter | ✅ | | vidya | Variable Index Dynamic Average | ✅ | | volatility | Annualized Historical Volatility | ✅ | | vosc | Volume Oscillator | ✅ | | vwma | Volume Weighted Moving Average | ✅ | | wad | Williams Accumulation/Distribution | ✅ | | wcprice | Weighted Close Price | ✅ | | wilders | Wilders Smoothing | ✅ | | willr | Williams %R | ✅ | | wma | Weighted Moving Average | ✅ | | zlema | Zero-Lag Exponential Moving Average | ✅ | | abands | | ✅ | | alma | Arnaud Legoux Moving Average | ✅ | | ce | Chandelier Exit | ✅ | | cmf | Chaikin money flow | ✅ | | dc | Donchian Channels | ✅🔄 | | fi | Force index | ✅ | | kc | Keltner Channels | ✅ | | kst | Know Sure Thing | ✅ | | pbands | | ✅ | | pfe | Polarized Fractal Efficiency | ✅ | | posc | | ✅ | | rmi | Relative Momentum Index | ✅ | | rmta | Recursive Moving Trend Average | ✅ | | rvi | Relative Vigor Index | ✅ | | smi | Stochastic Momentum Index | ✅ | | tsi | True Strength Index | ✅ | | vwap | Volume-Weighted Average Price | ✅ |