Technicalindicators
A javascript technical indicators written in typescript with pattern recognition right in the browser
Install / Use
npx skills add anandanand84/technicalindicatorsInstalls into whichever agent you are using.
README
TechnicalIndicators
A javascript technical indicators written in typescript.
Installation
Node.js versions >= 10
npm install --save technicalindicators
const SMA = require('technicalindicators').SMA;
Node.js versions < 10
For nodejs version below 10 use 1.x versions of this library.
Webpack
Make sure you have the following in your config file.
module.exports = {
resolve: {
mainFields: ["module", "main"]
}
}
Browser
For browsers install using npm,
For ES6 browsers use
npm install --save technicalindicators
<script src="node_modules/technicalindicators/dist/browser.es6.js"></script>
For ES5 support it is necessary to include the babel-polyfill and respective file browser.js otherwise you will get an error. For example see index.html
npm install --save technicalindicators
npm install --save babel-polyfill
<script src="node_modules/babel-polyfill/browser.js"></script>
<script src="node_modules/technicalindicators/dist/browser.js"></script>
Pattern detection
Pattern detection is removed from version 3.0, if you need pattern detection use v2.0
All indicators will be available in window object. So you can just use
sma({period : 5, values : [1,2,3,4,5,6,7,8,9], reversedInput : true});
or
SMA.calculate({period : 5, values : [1,2,3,4,5,6,7,8,9]});
Playground
Playground with code completion
Crypto Trading hub
If you like this project. You'll love my other project crypto trading hub
- Its free
- Realtime price charts
- Unified trading experience across exchanges
- Price alerts
- Realtime crypto screening using javascript (Find coins making high and low in realtime or anything you can write using this library and javascript in realtime)
- Trading from charts,
- Modify orders and ability to trade and create studies using javascript.

Available Indicators
- Accumulation Distribution Line (ADL).
- Average Directional Index (ADX).
- Average True Range (ATR).
- Awesome Oscillator (AO).
- Bollinger Bands (BB).
- Commodity Channel Index (CCI).
- Force Index (FI).
- Know Sure Thing (KST).
- Moneyflow Index (MFI).
- Moving Average Convergence Divergence (MACD).
- On Balance Volume (OBV).
- Parabolic Stop and Reverse (PSAR).
- Rate of Change (ROC).
- Relative Strength Index (RSI).
- Simple Moving Average (SMA).
- Stochastic Oscillator (KD).
- Stochastic RSI (StochRSI).
- Triple Exponentially Smoothed Average (TRIX).
- Typical Price.
- Volume Weighted Average Price (VWAP).
- Volume Profile (VP).
- Exponential Moving Average (EMA).
- Weighted Moving Average (WMA).
- Wilder’s Smoothing (Smoothed Moving Average, WEMA).
- WilliamsR (W%R).
- Ichimoku Cloud.
Other Utils
Chart Types
CandleStick Pattern
- Abandoned Baby.
- Bearish Engulfing Pattern.
- Bullish Engulfiing Pattern.
- Dark Cloud Cover.
- Downside Tasuki Gap.
- Doji.
- DragonFly Doji.
- GraveStone Doji.
- BullishHarami.
- Bearish Harami Cross.
- Bullish Harami Cross.
- Bullish Marubozu.
- Bearish Marubozu.
- Evening Doji Star.
- Evening Star.
- Bearish Harami.
- Piercing Line.
- Bullish Spinning Top.
- Bearish Spinning Top.
- Morning Doji Star.
- Morning Star.
- Three Black Crows.
- Three White Soldiers.
- Bullish Hammer.
- Bearish Hammer.
- Bullish Inverted Hammer.
- Bearish Inverted Hammer.
- Hammer Pattern.
- Hammer Pattern (Unconfirmed).
- Hanging Man.
- Hanging Man (Unconfirmed).
- Shooting Star.
- Shooting Star (Unconfirmed).
- Tweezer Top.
- Tweezer Bottom.
or
Search for all bullish or bearish using
var twoDayBullishInput = {
open: [23.25,15.36],
high: [25.10,30.87],
close: [21.44,27.89],
low: [20.82,14.93],
}
var bullish = require('technicalindicators').bullish;
bullish(twoDayBullishInput) //true
API
There are three ways you can use to get the indicator results.
calculate
Every indicator has a static method calculate which can be used to calculate the indicator without creating an object.
const sma = require('technicalindicators').sma;
var prices = [1,2,3,4,5,6,7,8,9,10,12,13,15];
var period = 10;
sma({period : period, values : prices})
or
const SMA = require('technicalindicators').SMA;
var prices = [1,2,3,4,5,6,7,8,9,10,12,13,15];
var per
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.6kCommit, push, and open a PR
