Skip to content

fritzh321/ichimoku

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis CI

Ichimoku Kinko Hyo Technical Indicator

A Javascript implementation of the technical indicator Ichimoku Kinko Hyo.

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))
  5. Chikou Span (Lagging Span): Close plotted 26 days in the past
Usage
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
{ 
	"conversion" : 1.33956,
	"base"       : 1.33723,
	"spanA"      : 1.33791,
	"spanB"      : 1.33735,
	"lagging"    : 1.33326
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%