Package Exports
- zenbot-bollinger-bands
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zenbot-bollinger-bands) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bollinger-bands
Fintach math utility to calculate bollinger bands.
Install
$ npm install bollinger-bandsUsage
import boll from 'bollinger-bands'
boll([1, 2, 4, 8], 2, 2)
// {
// upper: [, 2.5, 5, 10],
// mid : [, 1.5, 3, 6],
// lower: [, 0.5, 1, 2]
// }boll(datum, size, times, options)
- datum
Array.<Number>the collection of data - size
Number=20the period size, defaults to20 - times
Number=2the times of standard deviation between the upper band and the moving average. - options
Object=optional options- ma
Array.<Number>=the moving averages of the provideddatumand periodsize. This option is used to prevent duplicate calculation of moving average. - sd
Array.<Number>=the standard average of the provideddatumand periodsize
- ma
Returns Array.<Band> the array of the Band object.
struct Band
- upper
Numberthe value of the upper band - mid
Numberthe value middle band (moving average) - lower
Numberthe value of the lower band
Related Fintech Modules
- moving-averages: The complete collection of utility methods for Moving average.
- s-deviation: Math utility to calculate standard deviations.
License
MIT