technical-analysis is the npm package implementing well known technical analysis formulas.
Install the technical-analysis npm
npm install technical-analysisvar TA = require("technical-analysis").TechnicalAnalysis;
var ta = new TA();
/* prepare the data array */
var d = [1,2,3,4,5];
/* get the moving average of the data set */
var r = ta.movingAverage(d, 5);
/* r = [NaN,NaN,NaN,NaN,3] */
- bollingerBands(data, interval, upperBandStd, lowerBandStd)
- exponentialMovingAverage(data, interval)
- max(data, interval)
- min(data, interval)
- movingAverage(data, interval)
npm testAnd you are welcome to contribute to this library.
This software is free to use under the BSD license. See the LICENSE file for license text and copyright information.