https://github.com/rd13/ichimoku
https://github.com/rd13/ichimoku
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rd13/ichimoku
- Owner: rd13
- Created: 2017-12-23T16:44:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-24T13:17:33.000Z (over 7 years ago)
- Last Synced: 2026-02-23T22:13:05.422Z (4 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 21
- Watchers: 1
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-github-projects - ichimoku - No description provided ⭐21 `JavaScript` (📦 Legacy & Inactive Projects)
README
[](https://travis-ci.org/rd13/ichimoku) [](https://badge.fury.io/js/ichimoku)
# Ichimoku Kinko Hyo Technical Indicator
A Javascript implementation of the technical indicator [Ichimoku Kinko Hyo](https://en.wikipedia.org/wiki/Ichimoku_Kink%C5%8D_Hy%C5%8D).
It calculates:
1. Tenkan-sen (ConversionLine): (9-period high + 9-period low)/2))
2. Kijun-sen (Base Line): (26-period high + 26-period low)/2))
3. Senkou Span A (Leading Span A): (Conversion Line + Base Line)/2))
4. Senkou Span B (Leading Span B): (52-period high + 52-period low)/2))
## Installation
``` bash
npm install ichimoku
```
## Usage
```javascript
const ichimoku = new Ichimoku({
conversionPeriod : 9,
basePeriod : 26,
spanPeriod : 52,
displacement : 26,
values : []
})
for( let candle of candles ) {
let ichimokuValue = ichimoku.nextValue({
high : candle.high,
low : candle.low,
close : candle.close
})
}
```
###### Output
```json
{
"conversion" : 1.33956,
"base" : 1.33723,
"spanA" : 1.33791,
"spanB" : 1.33735
}
```