Giter Site home page Giter Site logo

btm2021 / indicators Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ixjb94/indicators

0.0 0.0 0.0 572 KB

Fastest Technical Indicators written in typescript, Supports: Browser, NodeJS, ES6, CommonJS. More than +100 indicators(SMA, EMA, RSI, MACD, ...)

License: MIT License

JavaScript 0.21% TypeScript 99.79%

indicators's Introduction

CodeFactor npm version npm size npm downloads last commit

logo

Supports

Browser, ES6, CommonJS

About

Fastest Technical Indicators written in typescript

Installation

npm install @ixjb94/indicators

Usage NodeJS

import { Indicators } from "@ixjb94/indicators"

// OR
const { Indicators } = require("@ixjb94/indicators")

Usage Browser

index.html example:

<!DOCTYPE html>
<html lang="en">
<head>
	<title>My Indicators</title>
</head>
<body>
	<script src="./node_modules/@ixjb94/indicators/dist/indicators-browser.js"></script>
	<script>
		const library = indicators
		const ta = new library.Indicators()

		ta.ema(close, 20).then(data => console.log(data))
	</script>
</body>
</html>

Note: you can move files from node_modules to somewhere else you want to like dist, public, etc.

OR you can use unpkg:

https://unpkg.com/@ixjb94/indicators@latest/dist/indicators-browser.js

Indicators Contains

Indicators contains this classes:
1- Indicators: new Indicators()
2- IndicatorsNormalized: new IndicatorsNormalized()

Q: What is the difference between Indicators and IndicatorsNormalized?
A: IndicatorsNormalized will fill the gap for you, example (SMA 3 with 5 closes):

[NaN, NaN, 1, 2, 3]

But the Indicators will give you the SMA3 with 5 closes like this:

[1, 2, 3]

Note: Please note that the performance between IndicatorsNormalized and Indicators are the same,
so it's better to use IndicatorsNormalized.

Examples

Note: Everything isPromised so you need to do .then or await

let ta = new Indicators()

ta.sma(close, 20)
ta.rsi(close, 14)

Types & Intellisense & Browser Support

types browser

Indicators

โœ… = Available and fastest
โŒ = Indicator is not available
๐Ÿ”„ = Developing...
Compared to:
node-talib, tulipnode, technicalindicators, pandas_ta

Identifier Indicator Name @ixjb94/indicators
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 โœ…
cosh Vector Hyperbolic Cosine โœ…
crossany Crossany โœ…
crossover Crossover โœ…
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 โœ…
copp Coppock Curve โŒ
dc Donchian Channels โœ…๐Ÿ”„
fi Force index โœ…
ikhts โŒ
kc Keltner Channels โœ…
kst Know Sure Thing โœ…
mama MESA Adaptive Moving Average โŒ
pbands โœ…
pc โŒ
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 โœ…

Icon by

https://www.flaticon.com/free-icon/bar-graph_3501061
Author: Freepik
Website: https://www.freepik.com
https://www.flaticon.com/authors/freepik

indicators's People

Contributors

ixjb94 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.