Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jstock

quick-sort25Apache-2.00.0.2

A pure js library to calculate MACD/KDJ/BOLL... for stock

stock, macd, kdj, boll

readme

jstock

NPM version Build status Test coverage License Downloads

A pure js library for calculating MACD/KDJ/....

const jstock = require('jstock')

let close = [1, 2, 3, 4]
let high = [2, 3, 4, 5]
let low = [0, 1, 2, 3]
jstock.ma(close,  5)
jstock.ema(close, 5)
jstock.wma(close, 5)
const {dif, dea, bar} = jstock.macd(close, 12, 26, 9)
const {mb, up, bn} = jstock.boll(close, 20)
const {k, d, j} = jstock.kdj(close, high, low, 20)