jstock
v0.0.2
Published
A pure js library to calculate MACD/KDJ/BOLL... for stock
Downloads
66
Readme
jstock
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)