https://github.com/zerodom30/node-rsi
Simple nodejs async RSI module
https://github.com/zerodom30/node-rsi
nodejs-modules relative-strength-index rsi technical-analysis
Last synced: 9 months ago
JSON representation
Simple nodejs async RSI module
- Host: GitHub
- URL: https://github.com/zerodom30/node-rsi
- Owner: zerodom30
- License: mit
- Created: 2018-08-18T05:57:24.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T05:33:18.000Z (almost 3 years ago)
- Last Synced: 2024-11-06T12:58:48.522Z (about 1 year ago)
- Topics: nodejs-modules, relative-strength-index, rsi, technical-analysis
- Language: JavaScript
- Size: 360 KB
- Stars: 9
- Watchers: 2
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://coveralls.io/github/zerodom30/node-rsi?branch=master)
# node-rsi
A simple node module to calculate the Relative Strength Index and avoid JavaScript precision issues.
# Usage:
```
const data = [
47.61,
47.57,
48.2,
49.23,
49.25,
47.54,
47.69,
46.83,
46.03,
46.08,
46.23,
46.5,
46.26,
45.15
];
const rsi = new RSI(data, 14);
const result = rsi.calculate((err, result) => {
if (err) {
return err;
}
console.log('RSI: ', result);
/*
RSI:
[
{ value: 45.15, gain: 0, loss: 0, change: 0 },
{ value: 46.26, change: 1.11, gain: 1.11, loss: 0 },
{ value: 46.5, change: 0.24, gain: 0.24, loss: 0 },
{ value: 46.23, change: -0.27, gain: 0, loss: 0.27 },
{ value: 46.08, change: -0.15, gain: 0, loss: 0.15 },
{ value: 46.03, change: -0.05, gain: 0, loss: 0.05 },
{ value: 46.83, change: 0.80, gain: 0.80, loss: 0 },
{ value: 47.69, change: 0.86, gain: 0.86, loss: 0 },
{ value: 47.54, change: -0.15, gain: 0, loss: 0.15 },
{ value: 49.25, change: 1.71, gain: 1.71, loss: 0 },
{ value: 49.23, change: -0.02, gain: 0, loss: 0.02 },
{ value: 48.2, change: -1.03, gain: 0, loss: 1.03 },
{ value: 47.57, change: -0.63, gain: 0, loss: 0.63 },
{ value: 47.61, change: 0.04, gain: 0.04, loss: 0 }
];
*/
});
```
###### Commit Message With Emoji Prefix
See reference [here](https://gist.github.com/parmentf/035de27d6ed1dce0b36a)
inspiration & reference by
[dannyfritz/commit-message-emoji](https://github.com/dannyfritz/commit-message-emoji).